@charset "UTF-8";
/*
 * Головна сторінка. Підключається лише на front-page.
 * Розміри й кольори звірені з Home.dc.html (макет 1440 px).
 */

/* ---------------------------------------------------------------- hero ---- */

.home-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /*
   * Шапка на головній лежить поверх геро (position:absolute) і місця в потоці
   * не займає — тому відступ згори дорівнює її висоті, інакше заголовок
   * підповзає під меню.
   */
  padding-top: var(--header-h);
  background: var(--c-navy);
  isolation: isolate;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.home-hero__intro {
  /*
   * Смуга категорій нижче заходить на геро від'ємним відступом і має z-index,
   * тож без власного контексту вона накривала форму пошуку і з'їдала кліки
   * по всьому рядку.
   */
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 35px;
  padding-inline: var(--gutter);
  text-align: center;
}

/* Кожен рядок у макеті — окремий блок висотою 82.5 px. */
.home-hero__line {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82.5px;
  width: 100%;
}

/* На широких екранах рядки йдуть в один рядок, як у макеті; нижче — переносяться. */
@media (min-width: 1200px) {
  .home-hero__line > * {
    white-space: nowrap;
  }
}

/* Рядки 1 і 3 — серифні, рядок 2 — Montserrat курсивом. Усі темні: під ними світла арка. */
.home-hero__title,
.home-hero__line-3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.215;
  letter-spacing: -0.042em;
  color: var(--c-navy);
}

.home-hero__line-2 {
  font-family: var(--f-ui);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(19px, 2.3vw, 32px);
  /* 55.68 / 32 — точно як у макеті, інакше рядок сидить щільніше. */
  line-height: 1.74;
  color: var(--c-navy);
}

/* Пошук */

.hero-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: min(100%, 765px);
  min-height: 80px;
  margin: 40px 0;
  padding: 12px;
  border-radius: 51px;
  background: #fff;
  box-shadow: 0 49px 29px rgba(0, 0, 0, 0.05), 0 22px 22px rgba(0, 0, 0, 0.09), 0 5px 12px rgba(0, 0, 0, 0.1);
}

.hero-search__deal {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 52px;
  padding: 4px 2px;
  border-radius: 43px;
  background: #e9e9e9;
}

/* Біла «пігулка» їздить під активною вкладкою — так само, як у макеті. */
.hero-search__pill {
  position: absolute;
  top: 4px;
  left: 2px;
  width: 91px;
  height: 44px;
  border-radius: 38px;
  background: #fff;
  box-shadow: 0 1px 2px -1px rgba(10, 9, 11, 0.12), 0 1.5px 4px -1px rgba(10, 9, 11, 0.07);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.hero-search__deal button {
  position: relative;
  z-index: 1;
  width: 93px;
  height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 20px;
  color: #051b30;
  cursor: pointer;
}

.hero-search__sep {
  width: 1px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #e9e9e9;
}

.hero-search__dropdown {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: 200px;
  height: 56px;
}

.hero-search__toggle {
  display: flex;
  align-items: center;
  width: 100%;
  height: 56px;
  padding: 0 38px 0 16px;
  border: 0;
  border-radius: 28px;
  background: transparent;
  font-family: var(--f-ui);
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #141414;
  text-align: left;
  cursor: pointer;
}

.hero-search__caret {
  position: absolute;
  right: 16px;
  display: flex;
  opacity: 0.6;
  pointer-events: none;
  transition: transform 0.25s ease;
}

.hero-search__caret svg {
  width: 10px;
  height: 5px;
}

.hero-search__toggle[aria-expanded="true"] + .hero-search__caret {
  transform: rotate(180deg);
}

.hero-search__menu {
  position: absolute;
  left: -8px;
  top: 62px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 236px;
  padding: 8px;
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e6ddc5, 0 22px 22px rgba(0, 0, 0, 0.09), 0 5px 12px rgba(0, 0, 0, 0.1);
}

.hero-search__menu button {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 20px;
  color: #141414;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease;
}

.hero-search__menu button:hover {
  background: var(--c-bg);
}

.hero-search__field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 160px;
  height: 56px;
}

.hero-search__field input {
  width: 100%;
  height: 56px;
  /* Правий відступ більший за решту полів — інакше плейсхолдер лізе під кнопку. */
  padding: 0 16px 0 16px;
  margin-right: 8px;
  border: 0;
  border-radius: 28px;
  background: #fff;
  outline: none;
  font-family: var(--f-ui);
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #141414;
  transition: box-shadow 0.2s ease;
}

.hero-search__field input:focus {
  box-shadow: inset 0 0 0 1px #e6ddc5;
}

/* Кнопка пошуку — не темна, а піщана з тонкою рамкою. */
.hero-search__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 130px;
  height: 52px;
  padding: 14px 24px;
  border: 0;
  border-radius: 45px;
  background: rgba(175, 138, 47, 0.08);
  box-shadow: inset 0 0 0 1px #e6ddc5, 0 4px 7px rgba(0, 0, 0, 0.06);
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 20px;
  color: #051b30;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s ease;
}

.hero-search__submit:hover {
  background: rgba(175, 138, 47, 0.16);
}

.hero-search__submit svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .hero-search {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 28px;
    gap: 10px;
    padding: 16px;
  }

  .hero-search__sep {
    display: none;
  }

  .hero-search__deal {
    flex: 1 1 100%;
    justify-content: center;
  }

  .hero-search__deal button {
    flex: 1 1 0;
    width: auto;
  }

  .hero-search__pill {
    display: none;
  }

  /* Без «пігулки», що їздить, активність показуємо заливкою самої кнопки. */
  .hero-search__deal button[aria-pressed="true"] {
    background: #fff;
    border-radius: 38px;
    box-shadow: 0 1px 2px -1px rgba(10, 9, 11, 0.12);
  }

  .hero-search__dropdown,
  .hero-search__field {
    flex: 1 1 100%;
    width: 100%;
  }

  .hero-search__toggle,
  .hero-search__field input {
    box-shadow: inset 0 0 0 1px var(--c-line);
  }

  .hero-search__submit {
    width: 100%;
  }
}

/* ----------------------------------------------------------- категорії --- */

/*
 * Смуга плиток заходить на геро знизу (-55.5 px) і стоїть на світлому градієнті,
 * який гасить фото — саме так у макеті.
 */
/*
 * У макеті смуга — 415 px: 75 зверху, 324 плитка, 16 знизу. Беремо min-height,
 * а не height: на вужчих екранах ряд переноситься, і жорстка висота різала б
 * другий ряд.
 */
.home-categories {
  position: relative;
  z-index: 2;
  align-self: stretch;
  min-height: 415px;
  padding-top: 75px;
  margin-top: -55.5px;
  box-sizing: border-box;
  background: linear-gradient(-0.966deg, #f4f3f1 2.67%, rgba(153, 153, 153, 0) 97.17%);
}

/* Нижні 16 px — у макеті це padding самої плитки, тут відступ ряду. */
.home-categories__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-inline: var(--gutter);
  padding-bottom: 16px;
  gap: 16px;
}

.home-categories__grid .tile {
  width: 320px;
  aspect-ratio: 320 / 324;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px #fff;
}

@media (max-width: 767px) {
  /* На мобільному плитки стають у стовпчик, тож фіксована висота більше не тримає. */
  .home-categories {
    min-height: 0;
    margin-top: -32px;
    padding: 48px 0;
  }

  .home-categories__grid {
    padding-bottom: 0;
  }

  .home-categories__grid .tile {
    width: min(100%, 340px);
  }
}

/* ------------------------------------------------------------ complexes --- */

/* Плитка ЖК помітно вища за категорійну: 311×540 у макеті. */
.home-complexes .slider__track {
  --slide-w: 311px;
}

.home-complexes .tile {
  aspect-ratio: 311 / 540;
  border-radius: 24px;
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.09), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.home-complexes .tile__label {
  height: 82px;
  padding: 20px 16px;
  align-items: flex-end;
}

.home-complexes .tile__arrow {
  width: 42px;
  height: 42px;
}

@media (max-width: 480px) {
  .home-complexes .slider__track {
    --slide-w: 78vw;
  }
}

/* ---------------------------------------------------------------- about --- */

.home-about {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 56px 40px;
  border-radius: 48px;
  background: #f4f3f1;
  box-shadow: inset 0 0 0 1px #e5b05b;
}

.home-about__top {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}

.home-about__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--c-line);
  border-block: 1px solid var(--c-line);
}

.home-about__stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  background: #f4f3f1;
}

.home-about__stat-value {
  font-family: var(--f-display);
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  color: var(--c-ink);
}

.home-about__stat-label {
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.35;
  color: var(--c-muted);
}

.home-about .slider__track {
  --slide-w: 280px;
}

@media (max-width: 1023px) {
  .home-about {
    padding: 40px 24px;
    gap: 40px;
    border-radius: 32px;
  }

  .home-about__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .home-about__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .home-about {
    padding: 28px 16px;
    border-radius: 24px;
  }
}

/* Картка агента */

.agent-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  text-align: left;
}

/* У макеті фото агента квадратне (282×281), а не портретне. */
.agent-card__photo {
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: var(--c-line);
}

.agent-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.agent-card:hover .agent-card__photo img {
  transform: scale(1.04);
}

.agent-card__name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #000;
  text-transform: uppercase;
}

.agent-card__role {
  font-size: 16px;
  line-height: 1.19;
  letter-spacing: -0.02em;
  color: #000;
}

.agent-card__quote {
  font-size: 14px;
  line-height: 1.45;
  color: var(--c-muted);
}

/* ------------------------------------------------------------ platforms --- */

.home-platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 38px 24px;
}

/* Слот 208×104 з полями по 24 px — логотип усередині 160×84, як у макеті. */
.home-platforms > * {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 208px;
  height: 104px;
  padding: 0 24px;
}

.home-platforms img {
  width: 100%;
  height: 84px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.home-platforms a:hover img {
  opacity: 1;
}

/* -------------------------------------------------------------- reviews --- */

.home-reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 23px;
  min-width: 0;
  padding: 44px 32px;
  border-radius: 24px;
  background: var(--c-bg);
}

@media (max-width: 1023px) {
  .home-reviews__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-reviews__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.review-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.review-card__avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--c-line);
}

.review-card__name {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 16px;
}

.review-card__stars {
  display: flex;
  gap: 2px;
  color: var(--c-body);
}

.review-card__stars svg {
  width: 18px;
  height: 18px;
}

.review-card__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-body);
}

@media (max-width: 480px) {
  .review-card {
    padding: 28px 20px;
  }
}

/* ----------------------------------------------------------------- blog --- */

.home-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-card .card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 27, 48, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover .card__media::after {
  opacity: 1;
}

.post-card__cta {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-family: var(--f-ui);
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover .post-card__cta {
  opacity: 1;
}

.post-card__cta svg {
  width: 18px;
  height: 12px;
}

@media (max-width: 1023px) {
  .home-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-blog__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Каретка міста — єдина клікабельна, решта декоративні. */
.hero-search__caret--city {
  pointer-events: auto;
  cursor: pointer;
}

/* Список міст прив'язаний до правого краю поля, а не до лівого як у типів. */
.hero-search__menu--city {
  left: auto;
  right: -8px;
  width: min(236px, calc(100vw - 48px));
}

.hero-search__menu--city button.is-active {
  background: #edebe7;
}

.hero-search__empty {
  margin: 0;
  padding: 10px 14px;
  font-family: var(--f-ui);
  font-size: 14px;
  color: rgba(20, 20, 20, 0.5);
}
