/*
 * Objektų paieška: /lt/parduodami-objektai, tipų ir brokerių puslapiai.
 * Naudoja partials/objects_search.htm ir assets/js/objects-search.js.
 * Matmenys rem vienetais, kaip visoje svetainėje (1rem = 10px, siauresniame ekrane mažėja).
 * Visos klasės prasideda „os-“, kad nesikirstų su style.css.
 */
.os {
  --os-ink: #111;
  --os-mute: #6f6f6a;
  --os-line: #e3e2dc;
  --os-soft: #f5f4f0;
  --os-fs: max(1.5rem, 13px);
  padding: 3.3rem 0 6.4rem;
  color: var(--os-ink);
  font-size: 1.6rem;
  line-height: 1.4;
}

/* Antraštė, kategorijos */
.os-head { margin: 0 25%; min-height: var(--os-head-min, 27.5rem); }
.os-title { margin: 0 0 1.2rem; padding: 0; font-size: 5.2rem; line-height: 1.02; font-weight: 400; letter-spacing: -.01em; }
.os-intro { margin: 0; max-width: 56rem; color: var(--os-mute); font-size: max(1.7rem, 13px); }
.os-intro b { color: var(--os-ink); font-weight: 400; }
.os-agent { margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: .4rem 2rem; font-size: max(1.7rem, 13px); }
.os-agent a, .os-back, .os-ohl a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.os-back { display: inline-block; font-size: var(--os-fs); color: var(--os-mute); }
.os-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: 2.2rem 0 0; }
.os-tab { display: inline-block; border: 1px solid var(--os-ink); border-radius: 99.9rem; background-color: #fff; padding: .5rem 1.4rem; color: var(--os-ink); font-size: var(--os-fs); line-height: 1.4; white-space: nowrap; text-decoration: none; }
.os-tab span { margin-left: .4rem; color: var(--os-mute); }
.os-tab.is-on { background-color: var(--os-ink); color: #fff; }
.os-tab.is-on span { color: #bdbdb8; }
.os-tab--rent { border-style: dashed; }
.os-tabs__sep { flex: 1; min-width: 1.2rem; }
.os-ohl { margin: 1.6rem 0 0; font-size: var(--os-fs); }
.os-ohl::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background-color: #2f8f5b; vertical-align: 1px; }
.os-ohl a { white-space: nowrap; }

/* Filtrų juosta */
.os-mbar, .os-sheet-h, .os-sheet-go, .os-backdrop { display: none; }
.os-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-top: 2.6rem; padding: 1.2rem 0; border-top: 1px solid var(--os-line); border-bottom: 1px solid var(--os-line); }
.os-fld { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.os-fld label { font-size: max(1.2rem, 11px); color: var(--os-mute); }
.os-sel { -webkit-appearance: none; appearance: none; min-width: 13.2rem; border: 1px solid var(--os-line); border-radius: .8rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23111' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 1.2rem center; padding: .8rem 3.2rem .8rem 1.2rem; color: var(--os-ink); font-family: inherit; font-size: var(--os-fs); line-height: 1.4; cursor: pointer; }
.os-sel.is-set { border-color: var(--os-ink); }
.os-pair { display: flex; gap: .6rem; }
.os-pair .os-sel { min-width: 11.8rem; }
.os-clear { padding: .8rem .4rem; background: none; color: var(--os-mute); font-family: inherit; font-size: var(--os-fs); line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.os-clear[hidden], .os-empty[hidden], .os-nomap[hidden], .os-card[hidden], .os-fld[hidden], .os-mbtn[hidden], .os-pop[hidden] { display: none; }
.os-grow { flex: 1; }
.os-view { display: flex; overflow: hidden; border: 1px solid var(--os-ink); border-radius: 99.9rem; }
.os-view button { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.4rem; background-color: #fff; color: var(--os-ink); font-family: inherit; font-size: var(--os-fs); line-height: 1.4; cursor: pointer; }
.os-view button.is-on { background-color: var(--os-ink); color: #fff; }
.os-view svg { width: 1.5rem; height: 1.5rem; min-width: 12px; min-height: 12px; }
.os-btn { border-radius: 99.9rem; background-color: var(--os-ink); padding: .9rem 2rem; color: #fff; font-family: inherit; font-size: var(--os-fs); line-height: 1.4; text-align: center; white-space: nowrap; cursor: pointer; }
.os-btn.button--isDisabled { opacity: .5; pointer-events: none; }
.os-res { display: flex; justify-content: space-between; align-items: baseline; gap: 1.6rem; margin: 1.4rem 0 1.2rem; color: var(--os-mute); font-size: var(--os-fs); }
.os-res b { color: var(--os-ink); font-weight: 400; }

/* Kortelės */
.os-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.6rem 3.2rem; }
html.os-pending .os-grid { visibility: hidden; animation: os-reveal 0s linear 2.5s forwards; }
@keyframes os-reveal { to { visibility: visible; } }
.os-card { position: relative; min-width: 0; }
.os-card__link { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.os-card__ph { position: relative; overflow: hidden; aspect-ratio: 3 / 2; border-radius: .6rem; background-color: var(--os-soft); }
.os-card__ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.os-tag { position: absolute; left: 1rem; top: 1rem; border-radius: 99.9rem; background-color: #fff; padding: .3rem 1rem; font-size: max(1.3rem, 11px); line-height: 1.4; }
.os-tag--sold { background-color: #eab9ae; }
.os-tag--reserved { background-color: #d3c1ac; }
.os-tag--open { background-color: #acbed3; }
.os-card__bd { padding-top: 1.2rem; }
.os-card__pr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1rem; font-size: max(2.4rem, 18px); line-height: 1.1; }
.os-card__pr small { color: var(--os-mute); font-size: max(1.4rem, 12px); }
.os-card__t { margin: .6rem 0 .2rem; padding: 0; font-size: max(1.7rem, 14px); line-height: 1.3; font-weight: 400; }
/* Svetainės šriftas tarpą po kablelio suglaudžia („k.,Vilniaus“), todėl šioje eilutėje raidžių suglaudinimas išjungtas */
.os-card__loc { color: var(--os-mute); font-size: max(1.4rem, 12px); font-kerning: none; }
.os-card__facts { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.os-card__facts li { border: 1px solid var(--os-line); border-radius: 99.9rem; padding: .2rem 1rem; font-size: max(1.3rem, 11px); line-height: 1.4; }
.os-card.is-hl .os-card__ph { outline: 2px solid var(--os-ink); outline-offset: 3px; }
.os-empty { grid-column: 1 / -1; padding: 4rem 0 .8rem; text-align: center; }
.os-empty p { margin: 0 0 1.2rem; }
.os-nomap { margin: .8rem 0 0; color: var(--os-mute); font-size: max(1.3rem, 11px); }

/* Užklausos kortelė */
.os-lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); align-items: center; gap: 2.8rem; border-radius: 1rem; background-color: var(--os-soft); padding: 2.6rem 2.8rem; }
.os-lead__h { margin: 0 0 .6rem; padding: 0; font-size: max(2.6rem, 18px); line-height: 1.15; font-weight: 400; }
.os-lead__text p { margin: 0; color: var(--os-mute); font-size: var(--os-fs); }
.os-lead__text.form-success { display: none; }
.os-lead__text.form-success + .os-lead__form { grid-column: 1 / -1; }
.os-form { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 1rem; }
.os .os-form .form__control { width: auto; margin: 0; }
.os-inp { width: 100%; border: 1px solid var(--os-line); border-radius: .8rem; background-color: #fff; padding: .8rem 1.2rem; color: var(--os-ink); font-family: inherit; font-size: var(--os-fs); line-height: 1.4; }
.os-inp::placeholder { color: #a9a9a3; }
.os-inp:focus, .os-sel:focus { border-color: var(--os-ink); }
.os .os-form .form__control.notValid .os-inp { border-color: #f15121; }
.os-fld--submit .os-btn { width: 100%; }
.os .os-form .os-consent { grid-column: 1 / -1; }
.os .os-form .os-form__meta { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.os-lead__form .form__success { max-width: none; }

/* Žemėlapis */
.os-mapwrap { display: none; }
.os-map { width: 100%; height: 100%; overflow: hidden; border-radius: .8rem; background-color: var(--os-soft); }
.os-layout.is-map { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 2.8rem; }
.os-layout.is-map .os-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.8rem 2rem; }
.os-layout.is-map .os-lead { grid-template-columns: minmax(0, 1fr); }
.os-layout.is-map .os-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.os-layout.is-map .os-mapwrap { display: block; position: sticky; top: calc(var(--os-bar-h, 8.4rem) + 1.6rem); z-index: 0; height: calc(100vh - var(--os-bar-h, 8.4rem) - 3.2rem); }
/* Plačiame ekrane žemėlapio vaizde filtrų juosta lieka viršuje, žemėlapis – po ja, slenka tik sąrašas */
@media (min-width: 1101px) {
  .os--map .os-bar { position: sticky; top: 0; z-index: 8; background-color: #fff; }
}
.os-map__msg { margin: 0; padding: 2rem; color: var(--os-mute); font-size: var(--os-fs); }
.os-pin { position: absolute; z-index: 1; transform: translate(-50%, -50%); margin: 0; border: 0; border-radius: 999px; background-color: #111; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); padding: 3px 8px; color: #fff; font: 13px/1.2 David, Arial, sans-serif; white-space: nowrap; cursor: pointer; transition: transform .15s; }
.os-pin.is-hl { z-index: 3; background-color: #fff; color: #111; outline: 2px solid #111; transform: translate(-50%, -50%) scale(1.12); }
.os-pin--cl { background-color: #fff; box-shadow: 0 0 0 1.5px #111, 0 1px 4px rgba(0, 0, 0, .2); color: #111; }
.os-pin--cl.is-hl { background-color: #111; color: #fff; outline: 0; }
.os-pop { position: absolute; z-index: 5; width: 240px; max-height: 300px; overflow: auto; transform: translate(-50%, calc(-100% - 18px)); border-radius: 8px; background-color: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .28); font: 14px/1.3 David, Arial, sans-serif; }
.os-pop a { display: block; color: #111; text-decoration: none; }
.os-pop a + a { border-top: 1px solid #eee; }
.os-pop img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.os-pop div { padding: 10px 12px 12px; }
.os-pop b { display: block; font-size: 18px; font-weight: 400; }
.os-pop span { color: #6f6f6a; }
.os-pop--list img { display: none; }

/* Klaviatūra: matomas fokusas (svetainės bendras stilius jį panaikina) */
.os-tab:focus-visible, .os-sel:focus-visible, .os-inp:focus-visible, .os-btn:focus-visible, .os-mbtn:focus-visible,
.os-clear:focus-visible, .os-view button:focus-visible, .os-sheet-h button:focus-visible, .os-pin:focus-visible,
.os-back:focus-visible, .os-ohl a:focus-visible, .os-sold:focus-visible, .os-pop a:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.os-card__link:focus-visible { outline: 0; }
.os-card__link:focus-visible .os-card__ph { outline: 2px solid #111; outline-offset: 3px; }

/* Nuoroda į archyvą */
.os-sold { display: flex; justify-content: space-between; align-items: center; gap: 1.6rem; margin: 4.8rem 0 0; padding: 2rem 0; border-top: 1px solid var(--os-line); border-bottom: 1px solid var(--os-line); color: inherit; font-size: max(1.8rem, 14px); text-decoration: none; }
.os-sold span { color: var(--os-mute); font-size: var(--os-fs); }

@media (hover: hover) {
  .os-card:hover .os-card__ph img { transform: scale(1.03); }
  .os-tab:hover, .os-view button:hover { background-color: var(--os-ink); color: #fff; }
  .os-tab:hover span { color: #bdbdb8; }
}
@media (prefers-reduced-motion: reduce) {
  .os-card__ph img, .os-pin, .os-bar { transition: none !important; }
}

/* Siauresnis ekranas: dvi kortelės eilėje, žemėlapis virš sąrašo */
@media (max-width: 1100px) {
  .os-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-lead { grid-template-columns: minmax(0, 1fr); }
  .os-layout.is-map { grid-template-columns: minmax(0, 1fr); }
  .os-layout.is-map .os-mapwrap { position: relative; top: 0; order: -1; height: 60vh; }
}

/* Telefonas */
@media (max-width: 767px) {
  .os { --os-fs: 1.5rem; padding: 10.4rem 0 4.8rem; }
  .os-head { margin: 0; min-height: 0; }
  .os-title { margin-bottom: .6rem; font-size: 3rem; line-height: 1.1; }
  .os-intro, .os-agent { font-size: 1.5rem; }
  .os-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 1.4rem -2.4rem 0; padding: 0 2.4rem; scrollbar-width: none; }
  .os-tabs::-webkit-scrollbar { display: none; }
  .os-tabs__sep { flex: 0 0 .4rem; min-width: .4rem; }
  .os-ohl { margin-top: 1.2rem; font-size: 1.4rem; }

  .os-mbar { display: flex; gap: .8rem; position: sticky; top: 0; z-index: 9; margin-top: 1.2rem; border-bottom: 1px solid var(--os-line); background-color: #fff; padding: 1rem 0; transition: top .45s ease-in-out; }
  .header.header--mobile:not(.header--isHidden) ~ main .os-mbar { top: var(--os-header-h, 7.6rem); }
  /* Svetainės antraštė telefone: kol ji dar neprilipusi (nėra header--mobile), slėpimo poslinkis nereikalingas,
     nes ji jau nuslinkusi už ekrano. Be šios eilutės, paslinkus 30–40 % ekrano aukščio, poslinkis „pagauna“ už ekrano
     laukiantį meniu ir puslapis tampa dvigubai platesnis, o perjungus į žemėlapį puslapis sustoja būtent ten. */
  .header.header--isHidden:not(.header--mobile) { transform: none; }
  .os-mbtn { flex: 1; border: 1px solid var(--os-ink); border-radius: 99.9rem; background-color: #fff; padding: .7rem .8rem; color: var(--os-ink); font-family: inherit; font-size: 1.5rem; line-height: 1.4; text-align: center; white-space: nowrap; cursor: pointer; }
  .os-mbtn.is-on { background-color: var(--os-ink); color: #fff; }

  /* Virš slapukų juostos (z-index 9999), kad ji neuždengtų mygtuko „Rodyti“ */
  .os-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10001; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 1.4rem; max-height: 88vh; overflow: auto; margin: 0; border: 0; border-radius: 1.6rem 1.6rem 0 0; background-color: #fff; box-shadow: 0 -6px 30px rgba(0, 0, 0, .18); padding: 1.6rem 1.6rem 2rem; transform: translateY(105%); visibility: hidden; transition: transform .25s, visibility 0s .25s; }
  .os-bar.is-open { transform: none; visibility: visible; transition: transform .25s; }
  .os-sheet-h { display: flex; justify-content: space-between; align-items: center; font-size: 2rem; }
  .os-sheet-h button { background: none; color: inherit; font-family: inherit; font-size: 1.5rem; text-decoration: underline; cursor: pointer; }
  .os-sheet-go { display: block; width: 100%; padding: 1.2rem; font-size: 1.6rem; }
  .os-grow, .os-view { display: none; }
  .os-sel, .os-pair .os-sel { width: 100%; min-width: 0; font-size: 1.6rem; }
  .os-pair { width: 100%; }
  .os-pair .os-sel { flex: 1; }
  .os-clear { align-self: flex-start; padding: 0; font-size: 1.5rem; }
  .os-backdrop.is-open { display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10000; background-color: rgba(0, 0, 0, .35); }
  html.os-lock, html.os-lock body { overflow: hidden; }
  /* Kol atidaryti filtrai, pokalbių burbulas (z-index virš visko) neuždengia mygtuko „Rodyti“ */
  html.os-lock sp-live-chat { display: none !important; }

  .os-res { margin: 1.4rem 0 1.2rem; }
  .os-grid, .os-layout.is-map .os-grid { grid-template-columns: minmax(0, 1fr); gap: 2.8rem; }
  .os-card__ph { aspect-ratio: 16 / 9; }
  .os-card__pr { font-size: 2.2rem; }
  .os-lead { padding: 2rem 1.8rem; }
  .os-form, .os-layout.is-map .os-form { grid-template-columns: minmax(0, 1fr); }
  .os-inp { font-size: 1.6rem; }
  .os-sold { flex-direction: column; align-items: flex-start; gap: .4rem; font-size: 1.6rem; }
}
