/* ==========================================================================
   TZ Ingatlanok – main stylesheet
   ========================================================================== */

:root {
	--accent: #3b63e0;
	--accent-dark: #2f4fb3;
	--accent-soft: #ebf0fc;
	--red: #d63a3a;
	--text: #3a3d44;
	--muted: #7a7f8a;
	--heading: #23262d;
	--line: #e3e5ea;
	--grey: #f4f5f8;
	--topbar: #f1f2f4;
	--dark: #26282d;
	--darker: #1d1f23;
	--radius: 4px;
	--shadow: 0 2px 14px rgba(20, 30, 60, .08);
	--shadow-hover: 0 10px 30px rgba(20, 30, 60, .16);
	--font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-head: "Montserrat", "Roboto", system-ui, sans-serif;
	--container: 1170px;
	--gutter: 16px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: #fff; color: var(--text); font: 400 15px/1.65 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { margin: 0 0 .6em; color: var(--heading); font-family: var(--font-head); font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
sup { font-size: .6em; vertical-align: super; line-height: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 10px 16px; background: #fff; }
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons & form controls ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; padding: 10px 22px; border: 1px solid var(--accent); border-radius: var(--radius);
	background: var(--accent); color: #fff; font: 600 13px/1.2 var(--font-head); letter-spacing: .04em; text-transform: uppercase;
	transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--light { background: #fff; color: var(--accent); border-color: var(--line); }
.btn--light:hover { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); box-shadow: none; }
.btn--white { background: #fff; color: var(--accent); border-color: #fff; }
.btn--white:hover { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-soft); }
.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 34px; padding: 6px 16px; }

input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], select, textarea {
	width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
	background: #fff; font-size: 14px; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
textarea { resize: vertical; }
.field { position: relative; }
.field--select select { appearance: none; padding-right: 34px; cursor: pointer; }
.field--select .icon { position: absolute; right: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }

.notice { margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius); border-left: 4px solid; font-size: 14px; }
.notice--success { background: #eaf7ee; border-color: #2e9e57; color: #1f6a3b; }
.notice--error { background: #fdeeee; border-color: var(--red); color: #8f2424; }

/* ---------- Header ---------- */
.topbar { background: var(--topbar); }
.topbar__inner { display: flex; align-items: center; gap: 32px; min-height: 120px; padding-block: 16px; }
.topbar__logo { flex: none; }
.topbar__logo img { max-height: 70px; width: auto; }
.text-logo { display: inline-flex; flex-direction: column; align-items: center; color: var(--accent); line-height: 1; }
.text-logo:hover { color: var(--accent-dark); }
.text-logo__name { font: 600 31px/1 var(--font-head); letter-spacing: .01em; text-transform: uppercase; }
.text-logo__tag { margin-top: 6px; font: 600 10px/1 var(--font-head); letter-spacing: .5em; text-transform: uppercase; padding-left: .5em; }
.topbar__info { display: flex; gap: 40px; margin-left: 30px; flex: 1; font-size: 13px; }
.info-item { display: flex; align-items: flex-start; gap: 10px; }
.info-item .icon { margin-top: 1px; color: #555; }
.info-item div { display: flex; flex-direction: column; }
.info-item__strong { color: var(--heading); font-weight: 700; font-size: 14px; }
.topbar__tools { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.fav-link { display: inline-flex; align-items: center; gap: 6px; color: var(--heading); font-size: 13px; }
.fav-link .icon { width: 20px; height: 20px; }
.lang { position: relative; }
.lang__current { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.lang__current img, .lang__menu img { width: 16px; height: auto; display: inline-block; }
.lang__menu { position: absolute; right: 0; top: 100%; z-index: 50; display: none; min-width: 140px; margin: 4px 0 0; padding: 6px 0; list-style: none; background: #fff; box-shadow: var(--shadow); }
.lang.is-open .lang__menu { display: block; }
.lang__menu a { display: flex; gap: 8px; align-items: center; padding: 6px 14px; color: var(--text); }
.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--heading); }

.mainnav { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.admin-bar .mainnav { top: 32px; }
.is-scrolled .mainnav { box-shadow: 0 4px 18px rgba(0, 0, 0, .08); }
.mainnav .menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 18px 0; list-style: none; }
.mainnav .menu > li { position: relative; }
.mainnav .menu > li > a { display: flex; align-items: center; gap: 4px; padding: 10px 16px; border-radius: 2px; color: #555; font-size: 13px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; transition: background .2s, color .2s; }
.mainnav .menu > li > a:hover { color: var(--accent); }
.mainnav .menu > .current-menu-item > a, .mainnav .menu > .current-menu-ancestor > a, .mainnav .menu > .current_page_item > a, .mainnav .menu > .current_page_ancestor > a { background: var(--accent); color: #fff; font-weight: 700; }
.mainnav .menu-item-has-children > a::after, .mainnav .page_item_has_children > a::after { content: ""; border: 4px solid transparent; border-top-color: currentColor; margin: 4px 0 0 2px; }
.mainnav .sub-menu, .mainnav .children { position: absolute; left: 0; top: 100%; z-index: 60; min-width: 260px; margin: 0; padding: 8px 0; list-style: none; background: #fff; border-top: 3px solid var(--accent); box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
.mainnav li:hover > .sub-menu, .mainnav li:focus-within > .sub-menu, .mainnav li:hover > .children, .mainnav li:focus-within > .children { opacity: 1; visibility: visible; transform: none; }
.mainnav .sub-menu a, .mainnav .children a { display: block; padding: 9px 20px; color: var(--text); font-size: 14px; }
.mainnav .sub-menu a:hover, .mainnav .children a:hover, .mainnav .sub-menu .current-menu-item > a { background: var(--grey); color: var(--accent); }
.submenu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
	position: relative; display: flex; align-items: center; min-height: 460px; padding: 80px 0;
	background: radial-gradient(ellipse at center, rgba(10, 16, 34, .72) 0%, rgba(10, 16, 34, .45) 70%), var(--hero-bg, url(../img/hero.jpg)) center bottom / cover no-repeat;
	color: #fff; text-align: center;
}
.hero__inner { max-width: 1100px; }
.hero__title { margin: 0 0 18px; color: #fff; font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 2px 20px rgba(0, 0, 0, .3); }
.hero__text { max-width: 860px; margin: 0 auto; font-size: 16px; opacity: .95; }

/* ---------- Search ---------- */
.search-band { position: relative; z-index: 2; padding: 26px 0 30px; background: #fff; border-bottom: 1px solid var(--line); }
.search--bar .search__row { display: grid; grid-template-columns: 210px 1fr 1fr 1fr 190px; gap: 14px; align-items: stretch; }
.search--bar .search__row + .search__row { grid-template-columns: 1fr 1fr 1fr 1fr; margin-top: 14px; }
.toggle { display: flex; gap: 8px; margin: 0; padding: 0; border: 0; }
.toggle label { flex: 1; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius); color: var(--accent); font: 600 13px var(--font-head); text-transform: uppercase; cursor: pointer; transition: all .2s; }
.toggle input:checked + span { border-color: var(--line); background: #fff; box-shadow: var(--shadow); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); }
.range { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.range__label { font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--heading); }
.range input { min-height: 34px; padding: 4px 6px; border: 0; text-align: center; min-width: 0; }
.range input:focus { box-shadow: none; background: var(--grey); }
.range__dash { color: var(--muted); }
.range__unit { font-size: 13px; white-space: nowrap; color: var(--heading); }
.search__submit { min-height: 44px; }
.search.is-loading [data-count] { opacity: .4; }
.search__reset { display: block; margin-top: 10px; font-size: 13px; text-align: center; }

.search--sidebar { display: grid; gap: 12px; }
.search--sidebar .range { flex-wrap: wrap; padding: 6px 10px; }
.search--sidebar .range__label { width: 100%; }
.search--sidebar .range input { flex: 1; border: 1px solid var(--line); }
.field--labeled { display: grid; gap: 4px; }
.field--labeled label { font-size: 13px; font-weight: 700; color: var(--heading); }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section--grey { background: var(--grey); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section__title { margin: 0; font-size: clamp(26px, 3vw, 34px); }
.section .section__title:only-child, .section > .container > .section__title { margin-bottom: 28px; }
.section__more { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 14px; }

/* ---------- Property cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .3s, transform .3s, opacity .3s; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card.is-leaving { opacity: 0; transform: scale(.96); }
.card__media { position: relative; display: block; margin: 12px 12px 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 2px; background: var(--grey); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card--closed .card__media img { filter: grayscale(.85); }
.card__count { position: absolute; right: 10px; bottom: 8px; display: flex; align-items: center; gap: 5px; color: #fff; font-size: 18px; font-weight: 500; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.card__count .icon { width: 20px; height: 20px; }
.card__body { flex: 1; padding: 22px 22px 12px; }
.card__title { margin: 0 0 14px; font-size: 16px; }
.card__title a { color: var(--heading); }
.card__title a:hover { color: var(--accent); }
.card__text { min-height: 3.2em; margin-bottom: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.card__price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__type { color: var(--muted); font-size: 12px; text-align: right; }
.price-tag { display: inline-flex; align-items: stretch; border-radius: 2px; overflow: hidden; background: var(--accent); color: #fff; font: 700 15px/1 var(--font-head); white-space: nowrap; }
.price-tag { padding: 9px 0 9px 12px; }
.price-tag__unit { margin-left: 12px; padding: 0 12px; margin-block: -9px; display: flex; align-items: center; background: var(--accent-dark); font-size: 13px; }
.price-tag:not(:has(.price-tag__unit)) { padding-right: 12px; }
.card__foot { display: flex; align-items: center; gap: 10px; margin: 0 12px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: #fcfcfd; }
.stats { display: flex; flex: 1; justify-content: space-around; margin: 0; }
.stats__item { text-align: center; }
.stats dt { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.stats dd { margin: 0; color: var(--heading); font: 600 15px var(--font-head); }

.fav { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--heading); transition: color .2s, transform .2s; }
.fav .icon { width: 24px; height: 24px; }
.fav:hover { color: var(--red); }
.fav.is-on { color: var(--red); }
.fav.is-on .icon { fill: currentColor; }
.fav.pop { transform: scale(1.25); }

/* Diagonal ribbon in the photo corner */
.ribbon { position: absolute; top: 18px; left: -42px; z-index: 2; width: 150px; padding: 5px 0; transform: rotate(-45deg); background: rgba(255, 255, 255, .92); color: #555; font: 700 10px/1 var(--font-head); letter-spacing: .1em; text-align: center; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.ribbon--closed { background: var(--red); color: #fff; }
.badges { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 75%; }
.badge { padding: 5px 8px; border-radius: 2px; background: var(--badge, var(--accent)); color: #fff; font: 700 10px/1 var(--font-head); letter-spacing: .02em; text-transform: uppercase; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }

.no-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; min-height: 120px; background: linear-gradient(135deg, #eef1f6, #dde3ee); color: #8a94a8; font-size: 13px; }
.no-photo .icon { width: 36px; height: 36px; }

/* List view */
.cards--list { grid-template-columns: 1fr; }
.cards--list .card { display: grid; grid-template-columns: 300px 1fr; grid-template-rows: 1fr auto; }
.cards--list .card__media { grid-row: 1 / 3; margin: 12px; aspect-ratio: auto; min-height: 200px; }
.cards--list .card__body { padding: 20px 20px 10px 8px; }
.cards--list .card__foot { margin: 0 12px 12px 8px; }

/* ---------- Loan block ---------- */
.loan { position: relative; padding: 90px 0; color: rgba(255, 255, 255, .88); background: linear-gradient(90deg, rgba(22, 24, 30, .92) 0%, rgba(22, 24, 30, .8) 55%, rgba(22, 24, 30, .55) 100%), var(--loan-bg, url(../img/loan.jpg)) center / cover no-repeat fixed; }
.loan__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.loan__title { color: #fff; font-size: clamp(30px, 3.5vw, 40px); }
.loan p { font-size: 14px; }
.checklist { margin: 0 0 1.2em; padding: 0; list-style: none; font-size: 14px; }
.checklist li { position: relative; padding: 4px 0 4px 28px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat; }
.loan__figure { display: flex; justify-content: center; }
.loan__card { position: relative; display: flex; flex-direction: column; gap: 4px; width: min(340px, 100%); padding: 30px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; background: rgba(255, 255, 255, .08); backdrop-filter: blur(10px); box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
.loan__card-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.loan__card-value { color: #fff; font: 700 36px/1.1 var(--font-head); }
.loan__card-sub { font-size: 13px; opacity: .7; }
.loan__bars { display: flex; align-items: flex-end; gap: 8px; height: 90px; margin-top: 22px; }
.loan__bars i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 30%, transparent)); }

/* ---------- Page header ---------- */
.page-header { position: relative; padding: 48px 0 40px; color: #fff; text-align: center; background: linear-gradient(0deg, color-mix(in srgb, var(--accent) 88%, transparent), color-mix(in srgb, var(--accent) 88%, transparent)), var(--ph-bg, url(../img/page-header.jpg)) center / cover no-repeat; }
.page-header__title { margin: 0 0 6px; color: #fff; font-size: clamp(24px, 3vw, 30px); text-transform: uppercase; letter-spacing: .03em; }
.crumbs { font-size: 13px; }
.crumbs a { color: #fff; }
.crumbs a:hover { text-decoration: underline; color: #fff; }
.crumbs__sep { margin: 0 6px; opacity: .7; }

/* ---------- Layouts with sidebar ---------- */
.layout { display: grid; gap: 30px; padding-block: 40px 60px; }
.layout--sidebar-left { grid-template-columns: 280px 1fr; }
.layout--sidebar-right { grid-template-columns: 1fr 300px; }
.layout > * { min-width: 0; } /* Let the thumbnail strip scroll instead of widening the column. */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar__box { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.sidebar__title { position: relative; margin: 0 0 18px; padding-bottom: 12px; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; }
.sidebar__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--accent) 40%, var(--line) 40%); }
.sidebar__toggle { display: none; }

.results__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.results__title { margin: 0; font-size: 20px; }
.results__title span { font-weight: 600; }
.results__title small { color: var(--muted); font: 400 13px var(--font); }
.results__tools { display: flex; align-items: center; gap: 12px; }
.results__filter-note { margin: -8px 0 18px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sort select { min-width: 220px; min-height: 38px; padding-block: 6px; }
.view-switch { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.view-switch button { display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 0; background: #fff; color: var(--muted); }
.view-switch button[aria-pressed=true] { background: var(--accent); color: #fff; }

.recent__list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.recent__list a { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; color: var(--text); font-size: 13px; line-height: 1.4; }
.recent__list img, .recent__list .no-photo { width: 84px; height: 60px; min-height: 0; object-fit: cover; border-radius: 2px; }
.recent__list strong { display: block; color: var(--heading); }
.recent__list span span { display: block; }
.recent__price { color: var(--accent); font-weight: 700; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty > .icon { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--accent); }

.pagination { margin-top: 36px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pagination .page-numbers { display: flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text); }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Property page ---------- */
.gallery__stage { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: #111; }
.gallery__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; cursor: zoom-in; }
.gallery__slide.is-active { opacity: 1; z-index: 1; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__stage .badges, .gallery__stage .ribbon { z-index: 3; }
.gallery__nav { position: absolute; top: 50%; z-index: 3; display: flex; width: 46px; height: 46px; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--heading); transform: translateY(-50%); transition: background .2s, transform .2s; }
.gallery__nav:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__counter { position: absolute; left: 14px; bottom: 12px; z-index: 3; padding: 4px 10px; border-radius: 20px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; }
.gallery__thumbs { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.gallery__thumb { flex: none; width: 120px; padding: 0; border: 2px solid transparent; border-radius: 2px; background: none; opacity: .65; transition: opacity .2s, border-color .2s; }
.gallery__thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery__thumb:hover, .gallery__thumb.is-active { opacity: 1; border-color: var(--accent); }

.property__head { margin: 28px 0 24px; }
.property__title { margin-bottom: 14px; font-size: 32px; }
.property__title small { color: var(--heading); font-size: 14px; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 0 22px; padding: 12px 14px; background: #f0f2f5; border-radius: 2px; }
.facts dt { color: var(--heading); font-size: 13px; font-weight: 700; }
.facts dd { margin: 0; font-size: 14px; }
.facts .accent { color: var(--accent); font-weight: 700; }
.property__lead { margin: 0; color: var(--heading); font: 700 19px/1.4 var(--font-head); }

.box { margin-bottom: 26px; padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.box__title { margin: -22px -24px 18px; padding: 12px 24px; background: var(--grey); border-bottom: 1px solid var(--line); font-size: 16px; }
.params { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; margin: 0; }
.params div { display: flex; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.params dt { color: var(--muted); }
.params dd { margin: 0; color: var(--heading); font-weight: 500; }
.map { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 7; margin-bottom: 16px; border-radius: var(--radius); background: linear-gradient(135deg, #e8edf5, #d6deea) center / cover; overflow: hidden; }
.map::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(#fff 2px, transparent 2px), linear-gradient(90deg, #fff 2px, transparent 2px); background-size: 46px 46px; transform: rotate(-12deg) scale(1.4); }
.map.is-loaded::before { display: none; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map--tall { aspect-ratio: auto; min-height: 340px; margin: 0; }
.map__load { position: relative; }
.contact-lines { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 14px; }
.contact-lines li { display: flex; align-items: center; gap: 10px; }
.contact-lines .icon { color: var(--accent); }

.tools { display: flex; justify-content: space-around; padding: 10px 0; }
.tools__btn { display: flex; flex-direction: column; align-items: center; gap: 4px; width: auto; height: auto; padding: 4px 8px; border: 0; background: none; color: var(--heading); font-size: 12px; transition: color .2s; }
.tools__btn:hover { color: var(--accent); }
.tools__btn.fav.is-on { color: var(--red); }
.tools__btn .icon { width: 22px; height: 22px; }
.property__side { position: sticky; top: 90px; align-self: start; }

.agent--side { display: grid; gap: 14px; }
.agent--side .agent__photo { width: 140px; }
.agent__photo { display: block; overflow: hidden; border-radius: var(--radius); background: var(--grey); color: #b5bccb; }
.agent__photo img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; transition: transform .5s; }
.agent__photo:hover img { transform: scale(1.04); }
.agent__photo > .icon { width: 60%; height: auto; margin: 20% auto; }
.agent__name { margin-bottom: 10px; font-size: 16px; }
.agent__name a { color: var(--heading); }
.agent__meta { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 13px; }
.agent__meta li { display: flex; align-items: center; gap: 8px; word-break: break-word; }
.agent__meta .icon { color: var(--muted); }
.agent__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.agent--row { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.agent--row .agent__actions .btn { min-height: 36px; padding: 8px 14px; font-size: 11px; }
.agents { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.agent-profile { display: grid; grid-template-columns: minmax(0, 440px) 1fr; gap: 40px; align-items: start; margin-bottom: 50px; }

.social { display: flex; gap: 8px; margin-top: 14px; }
.social__item { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: var(--radius); background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s, transform .2s; }
.social__item .icon { width: 16px; height: 16px; }
.social__item:hover { color: #fff; transform: translateY(-2px); }
.social--small .social__item--facebook, .share__item--facebook { background: #3b5998; }
.social--small .social__item--instagram { background: #8a3ab9; }
.share { display: flex; gap: 8px; }
.share__item { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; position: relative; }
.share__item:hover { color: #fff; opacity: .9; }
.share__item--mail { background: #5b6170; }
.share__item--link { background: #2e9e57; }
[data-tip].is-copied::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 4px 10px; border-radius: 3px; background: var(--dark); color: #fff; font-size: 12px; white-space: nowrap; }

/* ---------- Forms ---------- */
.form__title { font-size: clamp(22px, 2.5vw, 30px); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__fields { display: grid; gap: 14px; align-content: start; }
.form__message textarea { height: 100%; min-height: 160px; }
.form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.form--compact .form__title { font-size: 16px; }

/* ---------- Contact page ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 50px; }
.contact-card h2 { font-size: 30px; }
.contact-card__box { display: flex; align-items: center; gap: 14px; min-height: 80px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; box-shadow: var(--shadow); }
.contact-card__box .icon { width: 26px; height: 26px; color: var(--accent); }
.contact-bottom { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; margin-top: 50px; }
.hours { margin: 0 0 12px; padding: 0; list-style: none; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }

/* ---------- Content (pages, descriptions) ---------- */
.content { max-width: 100%; }
.content > *:last-child { margin-bottom: 0; }
.content h2 { margin-top: 1.4em; font-size: 26px; }
.content h3 { margin-top: 1.2em; font-size: 20px; }
.content ul { padding-left: 1.2em; }
.content li { margin-bottom: .35em; }
.content blockquote { margin: 1.5em 0; padding: 14px 20px; border-left: 4px solid var(--accent); background: var(--grey); }
.content .wp-block-gallery a, .content .gallery a { cursor: zoom-in; }
.content .wp-block-gallery img { transition: transform .4s, filter .4s; }
.content .wp-block-gallery figure:hover img { transform: scale(1.03); filter: brightness(1.05); }
.page-figure { margin: 0 0 30px; }
.page-figure img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.service { display: flex; flex-direction: column; padding: 28px 26px; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); background: #fff; color: var(--text); box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.service:hover { color: var(--text); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.service__title { font-size: 18px; }
.service p { flex: 1; color: var(--muted); font-size: 14px; }
.service__more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: 13px; text-transform: uppercase; }
.posts { display: grid; gap: 30px; }
.post-item { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.post-item__date { color: var(--muted); font-size: 13px; }

/* ---------- Calculator ---------- */
.calc { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: stretch; }
.calc-intro { margin-bottom: 30px; }
.calc__form { display: grid; gap: 26px; margin: 0; padding: 30px; }
.calc__field span { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--heading); font-weight: 500; }
.calc__field output { color: var(--accent); font: 700 16px var(--font-head); }
.calc__field input[type=range] { width: 100%; accent-color: var(--accent); }
.calc__result { padding: 32px; border-radius: var(--radius); background: linear-gradient(145deg, var(--accent), var(--accent-dark)); color: rgba(255, 255, 255, .9); box-shadow: var(--shadow-hover); }
.calc__label { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.calc__big { margin: 4px 0 20px; color: #fff; font: 800 clamp(32px, 4vw, 44px)/1.1 var(--font-head); }
.calc__list { margin: 0 0 20px; }
.calc__list div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); font-size: 14px; }
.calc__list dd { margin: 0; color: #fff; font-weight: 700; }
.calc__note { font-size: 12px; opacity: .8; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #c3c6cc; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.1fr; gap: 40px; padding-block: 60px 50px; }
.footer__logo { margin-bottom: 18px; }
.footer__logo .text-logo { color: #fff; }
.footer__logo .text-logo__name { font-size: 22px; }
.footer__logo img { max-height: 70px; width: auto; filter: brightness(0) invert(1); }
.footer__label { margin: 0 0 4px; color: #fff; font-weight: 500; }
.footer__about .hours li { padding: 1px 0; font-size: 13px; justify-content: flex-start; }
.footer__about .hours li span:first-child::after { content: ":"; }
.footer__note { font-size: 13px; }
.footer__title { position: relative; margin-bottom: 22px; color: #fff; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; }
.footer__links, .footer__links .sub-menu, .footer__links .children { margin: 0; padding: 0; list-style: none; }
.footer__links .sub-menu, .footer__links .children { padding-left: 14px; }
.footer__links a { position: relative; display: inline-block; padding: 4px 0 4px 18px; color: #c3c6cc; font-size: 13px; }
.footer__links a::before { content: ""; position: absolute; left: 2px; top: 50%; width: 6px; height: 6px; border-top: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); transform: translateY(-50%) rotate(45deg); transition: left .2s; }
.footer__links a:hover { color: #fff; }
.footer__links a:hover::before { left: 5px; }
.footer__contact { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.footer__contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer__contact .icon { margin-top: 2px; color: var(--accent); }
.footer__contact a { color: #c3c6cc; }
.footer__contact a:hover { color: #fff; }
.footer__bottom { padding: 18px 0; background: var(--darker); color: #8b8f98; font-size: 13px; text-align: center; }
.footer__bottom a { color: #c3c6cc; }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s; box-shadow: var(--shadow-hover); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-dark); }

.cookiebar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; max-width: 900px; margin: 0 auto; padding: 14px 20px; border-radius: 6px; background: var(--darker); color: #e3e5ea; font-size: 13px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.cookiebar[hidden] { display: none; }
.cookiebar p { margin: 0; }
.cookiebar a { color: #fff; text-decoration: underline; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(10, 12, 16, .94); }
.lightbox[hidden] { display: none; }
.lb-open { overflow: hidden; }
.lightbox__stage { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; padding: 60px 80px; }
.lightbox__stage img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox__stage figcaption { margin-top: 14px; color: #aaa; font-size: 13px; }
.lightbox button { position: absolute; display: flex; width: 50px; height: 50px; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.card.reveal.is-in:hover { transform: translateY(-3px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
	.search--bar .search__row { grid-template-columns: 1fr 1fr 1fr; }
	.search--bar .search__row + .search__row { grid-template-columns: 1fr 1fr; }
	.topbar__info { gap: 24px; margin-left: 0; }
}

@media (max-width: 1023px) {
	.topbar__inner { min-height: 80px; gap: 16px; }
	.topbar__info { display: none; }
	.text-logo__name { font-size: 24px; }
	.text-logo__tag { font-size: 8px; }
	.nav-toggle { display: inline-flex; }
	.mainnav { position: sticky; border-bottom: 0; }
	.mainnav .container { padding: 0; }
	.mainnav .menu { display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border-top: 1px solid var(--line); max-height: calc(100vh - 80px); overflow-y: auto; }
	.mainnav.is-open .menu { display: flex; }
	.mainnav .menu > li > a { padding: 14px var(--gutter); border-bottom: 1px solid var(--line); border-radius: 0; }
	.mainnav .menu-item-has-children > a::after, .mainnav .page_item_has_children > a::after { display: none; }
	.mainnav .sub-menu, .mainnav .children { position: static; display: none; min-width: 0; padding: 0; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; background: var(--grey); }
	.mainnav li.is-open > .sub-menu, .mainnav li.is-open > .children { display: block; }
	.mainnav .sub-menu a, .mainnav .children a { padding: 12px calc(var(--gutter) + 16px); border-bottom: 1px solid var(--line); }
	.submenu-toggle { position: absolute; right: 0; top: 0; display: flex; width: 52px; height: 49px; align-items: center; justify-content: center; border: 0; border-left: 1px solid var(--line); background: none; color: inherit; }
	.current-menu-item > .submenu-toggle, .current-menu-ancestor > .submenu-toggle { color: #fff; }
	.is-open > .submenu-toggle svg { transform: rotate(180deg); }

	.cards { grid-template-columns: repeat(2, 1fr); gap: 24px; }
	.layout--sidebar-left, .layout--sidebar-right { grid-template-columns: 1fr; }
	.sidebar__toggle { display: flex; }
	.layout--sidebar-left .sidebar #filters { display: none; }
	.layout--sidebar-left .sidebar #filters.is-open { display: block; }
	.layout--sidebar-left .recent { display: none; }
	.property__side { position: static; }
	.loan { background-attachment: scroll; }
	.loan__inner { grid-template-columns: 1fr; }
	.loan__figure { justify-content: flex-start; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.agents { grid-template-columns: 1fr; }
	.agent-profile { grid-template-columns: 1fr; }
	.calc { grid-template-columns: 1fr; }
	.contact-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
	body { font-size: 14px; }
	.section { padding: 44px 0; }
	.hero { min-height: 340px; padding: 60px 0; }
	.hero__text { font-size: 14px; }
	.search--bar .search__row, .search--bar .search__row + .search__row { grid-template-columns: 1fr; }
	.cards, .cards--2 { grid-template-columns: 1fr; }
	.cards--list .card { display: flex; }
	.cards--list .card__media { aspect-ratio: 3 / 2; min-height: 0; margin: 12px 12px 0; }
	.view-switch { display: none; }
	.results__tools, .sort { width: 100%; }
	.sort select { min-width: 0; }
	.sort .field { flex: 1; }
	.facts { grid-template-columns: 1fr 1fr; gap: 10px; }
	.params { grid-template-columns: 1fr; }
	.property__title { font-size: 26px; }
	.box { padding: 18px; }
	.box__title { margin: -18px -18px 16px; padding: 12px 18px; }
	.form__grid { grid-template-columns: 1fr; }
	.contact-cards { grid-template-columns: 1fr; gap: 18px; }
	.contact-card h2 { font-size: 22px; }
	.agent--row { grid-template-columns: 100px 1fr; gap: 16px; padding: 16px; }
	.footer__grid { grid-template-columns: 1fr; gap: 32px; }
	.post-item { grid-template-columns: 1fr; }
	.lightbox__stage { padding: 60px 10px; }
	.lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
	.gallery__thumb { width: 90px; }
	.section__head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
	.agent--row { grid-template-columns: 1fr; }
	.agent--row .agent__photo { width: 120px; }
	.text-logo__name { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Print (property sheet) ---------- */
@media print {
	.mainnav, .topbar__tools, .topbar__info, .site-footer, .to-top, .cookiebar, .lightbox, .tools, .share, .gallery__thumbs, .gallery__nav, .gallery__counter, .property__side .sidebar__box:not(:first-of-type), .recent, .form, .map, .section--grey, .btn { display: none !important; }
	body { font-size: 12px; color: #000; }
	.topbar { background: none; }
	.layout--sidebar-right { grid-template-columns: 1fr 220px; padding: 0; }
	.gallery__stage { aspect-ratio: 16 / 9; }
	.gallery__slide:not(.is-active) { display: none; }
	.box { break-inside: avoid; border: 0; padding: 0; }
	.box__title { margin: 12px 0 6px; padding: 0; background: none; }
	.card, .box, .sidebar__box { box-shadow: none; }
}
