/* Home page — design/heroes.jsx HomeHeroSearch + design/home-sections.jsx. Cards, badges, grid: catalog.css. */

.ev-home { padding-bottom: 0; }
.ev-home .ev-icon { flex: none; }
.ev-home h2 { font-size: var(--ev-fs-title); }

/* Hero: cypress decorative block on the right (desktop), white search card, popular links */
.ev-hero { position: relative; overflow: hidden; }
.ev-hero__decor { display: none; }
.ev-hero__inner {
  position: relative;
  max-width: var(--ev-section-max); margin-inline: auto;
  padding: 40px var(--ev-section-pad) 36px;
}
.ev-hero__text { max-width: 620px; }
.ev-hero__badge { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.ev-hero__title { margin-top: 18px; font-size: var(--ev-fs-title); font-weight: 700; line-height: 1.08; }
.ev-hero__title em { font-style: normal; color: var(--ev-cypress); }
.ev-hero__lead { max-width: 480px; margin: 16px 0 0; color: var(--ev-ink-2); }

@media (min-width: 1024px) {
  .ev-hero__decor {
    display: block;
    position: absolute; top: 0; right: 0;
    width: 42%; height: 460px;
    background: var(--ev-cypress);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
  }
  .ev-hero__img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.55; mix-blend-mode: multiply;
  }
  .ev-hero__inner { padding-block: 90px 72px; }
}

/* Search card */
.ev-hsearch {
  display: grid; gap: 6px;
  margin-top: 28px; padding: 8px;
  background: var(--ev-surface);
  border-radius: var(--ev-radius-lg);
  box-shadow: var(--ev-shadow-md);
}
.ev-hsearch__ops { display: flex; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ev-hsearch__tab { flex: 1; position: relative; cursor: pointer; }
.ev-hsearch__tab input { position: absolute; opacity: 0; pointer-events: none; }
.ev-hsearch__tab span {
  display: block; padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px; font-weight: 700; text-align: left;
  color: var(--ev-ink-3);
}
.ev-hsearch__tab input:checked + span { background: var(--ev-yellow); color: var(--ev-ink-on-yellow); }
.ev-hsearch__tab input:focus-visible + span { outline: 2px solid var(--ev-ink); outline-offset: 1px; }

.ev-hsearch__field {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-width: 0; padding: 10px 14px;
  border-radius: 12px;
  background: var(--ev-bg);
}
.ev-hsearch__label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ev-ink-3);
}
.ev-hsearch__control {
  width: 100%; min-width: 0; padding: 2px 0;
  border: 0; background: transparent;
  font: 600 15px/1.3 var(--ev-font); color: var(--ev-ink);
  appearance: none; -moz-appearance: textfield;
}
select.ev-hsearch__control {
  padding-right: 20px;
  background: no-repeat right center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a6a6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  cursor: pointer;
}
.ev-hsearch__control::-webkit-outer-spin-button,
.ev-hsearch__control::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ev-hsearch__control:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 4px; border-radius: 4px; }
.ev-hsearch__field:focus-within { box-shadow: inset 0 0 0 1px var(--ev-line-strong); }

/* Currency follows the selected operation: sale in $, rent in ₴ (no JS) */
.ev-hsearch__cur[data-op="rent"] { display: none; }
.ev-hsearch:has(input[name="op"][value="rent"]:checked) .ev-hsearch__cur[data-op="rent"] { display: inline; }
.ev-hsearch:has(input[name="op"][value="rent"]:checked) .ev-hsearch__cur[data-op="sale"] { display: none; }

.ev-hsearch__submit { padding: 16px 26px; font-size: 16px; }

@media (min-width: 640px) {
  .ev-hsearch { grid-template-columns: 1fr 1fr; }
  .ev-hsearch__ops, .ev-hsearch__field--wide, .ev-hsearch__submit { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .ev-hsearch {
    display: flex; align-items: stretch; gap: 0;
  }
  .ev-hsearch__ops {
    flex-direction: column; justify-content: center; flex: none;
    padding: 4px 12px 4px 4px;
    border-right: 1px solid var(--ev-line);
  }
  .ev-hsearch__tab { flex: none; }
  .ev-hsearch__tab span { padding: 8px 16px; font-size: 13px; }
  .ev-hsearch__field {
    flex: 1.1; padding: 12px 18px;
    background: transparent; border-radius: 0;
    border-right: 1px solid var(--ev-line);
  }
  .ev-hsearch__field--wide { flex: 1.6; }
  .ev-hsearch__field--narrow { flex: 0.8; }
  .ev-hsearch__submit { flex: none; margin: 6px; }
}

/* Popular landings */
.ev-hero__popular {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin-top: 18px;
  font-size: 13px; color: var(--ev-ink-3);
}
.ev-hero__popular-label { font-weight: 700; }
.ev-hero__popular a {
  color: var(--ev-ink-2);
  text-decoration: underline; text-decoration-color: var(--ev-line-strong); text-underline-offset: 3px;
}
.ev-hero__popular a:hover { color: var(--ev-ink); text-decoration-color: currentColor; }
@media (min-width: 1024px) {
  /* Keep the links left of the decor picture (it starts at 58% of the viewport): wrap instead of running onto it. */
  .ev-hero__popular { max-width: 52%; }
}

/* Agency numbers */
.ev-stats { position: relative; background: var(--ev-surface); border-top: 1px solid var(--ev-line); }
.ev-stats__inner {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  max-width: var(--ev-section-max); margin: 0 auto;
  padding: 24px var(--ev-section-pad);
}
.ev-stats__item { margin: 0; }
.ev-stats__value { font-size: var(--ev-fs-title); font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--ev-cypress); }
.ev-stats__label { margin: 6px 0 0; font-size: 13px; color: var(--ev-ink-3); }
@media (min-width: 1024px) {
  .ev-stats__inner { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-block: 28px; }
}

/* Section blocks — TQ section gap */
.ev-home__block { margin-top: var(--ev-section-gap); }
.ev-home__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px;
  margin-bottom: 28px;
}
.ev-home__head h2 { margin-top: 6px; }
.ev-home__more {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  padding-bottom: 2px; box-shadow: inset 0 -3px 0 var(--ev-yellow);
}

/* Mobile: two featured cards and a full-width link (design/mobile.jsx) */
.ev-home__more--bottom { display: none; }
@media (max-width: 639px) {
  .ev-home__featured .ev-grid > :nth-child(n+3) { display: none; }
  .ev-home__head .ev-home__more { display: none; }
  .ev-home__more--bottom {
    display: flex; width: 100%; margin-top: 20px;
    background: var(--ev-surface); border: 1px solid var(--ev-line-strong); box-shadow: none;
  }
}

/* New builds: one row of three on desktop, two cards below (2-column grid) */
@media (max-width: 1023px) {
  .ev-home__builds .ev-grid > :nth-child(n+3) { display: none; }
}

/* Category tiles */
.ev-tiles {
  display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none;
}
.ev-tile {
  position: relative; display: block; overflow: hidden;
  height: 140px;
  border-radius: var(--ev-radius-md);
  background: var(--ev-cypress);
  color: var(--ev-ink-on-dark); text-decoration: none;
}
.ev-tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.ev-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 30%, rgba(0, 0, 0, 0.7) 100%);
}
.ev-tile__body {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px;
}
.ev-tile__name { font-size: 16px; font-weight: 700; line-height: 1.2; }
.ev-tile__count { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; opacity: 0.9; }
.ev-tile:hover .ev-tile__img { transform: scale(1.04); }
.ev-tile:focus-visible { outline: 3px solid var(--ev-yellow); outline-offset: 2px; }
@media (min-width: 1024px) {
  .ev-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .ev-tile { height: 220px; }
  .ev-tile__body { padding: 22px; }
  .ev-tile__name { font-size: 22px; }
  .ev-tile__count { font-size: 13px; }
}

/* About */
.ev-about { display: grid; gap: 32px; align-items: center; }
.ev-about__media {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--ev-radius-md);
  background: var(--ev-cypress-wash);
}
.ev-about__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-about__text h2 { margin-top: 6px; }
.ev-about__lead { margin: 18px 0 0; color: var(--ev-ink-2); line-height: 1.6; }
.ev-about__list { display: grid; gap: 20px; margin: 28px 0 0; padding: 0; list-style: none; }
.ev-about__point { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.ev-about__point .ev-icon { color: var(--ev-cypress); }
.ev-about__desc { display: block; margin-top: 4px; font-size: 14px; color: var(--ev-ink-3); }
@media (min-width: 640px) {
  .ev-about__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ev-about { grid-template-columns: 1fr 1.2fr; gap: 80px; }
  .ev-about__media { aspect-ratio: auto; height: 480px; }
}

/* Call to action — cypress band is decorative, the buttons are the clickable part */
.ev-cta { margin-top: var(--ev-section-gap); background: var(--ev-cypress); color: var(--ev-ink-on-dark); }
.ev-cta__inner {
  display: grid; gap: 24px; align-items: center;
  max-width: var(--ev-section-max); margin: 0 auto;
  padding: 48px var(--ev-section-pad);
}
.ev-cta__title { color: inherit; }
.ev-cta__lead { max-width: 560px; margin: 14px 0 0; color: rgba(255, 255, 255, 0.82); line-height: 1.6; }
.ev-cta__phone { margin: 18px 0 0; color: rgba(255, 255, 255, 0.82); }
.ev-cta__phone a { color: var(--ev-ink-on-dark); font-weight: 700; }
.ev-cta .ev-lead { color: var(--ev-ink); }
.ev-btn--light { background: var(--ev-surface); color: var(--ev-ink); }
.ev-btn--light:hover { box-shadow: var(--ev-shadow-md); }
@media (min-width: 1024px) {
  .ev-cta__inner { grid-template-columns: 1.4fr 1fr; gap: 60px; padding-block: 80px; }
}

/* The footer follows the cypress CTA band directly */
.ev-home + .ev-footer { border-top: 1px solid rgba(255, 255, 255, 0.18); }

/* CRM field section root (/yeoselia/): program text (free HTML from the editor) in a full-width white card —
   larger intro, lists as a grid of lilac tiles (a leading <strong> is the tile heading), paragraphs kept to a
   readable width. CSS only, any markup works; .ev-content in the selector beats blog.css list padding. */
.ev-section-page__text {
  margin-top: 28px; padding: 28px 22px; background: var(--ev-surface); border-radius: var(--ev-radius-xl);
}
.ev-section-page__text > * { max-width: 860px; }
.ev-section-page__text > p:first-child { font-size: 18px; line-height: 1.6; color: var(--ev-ink); }
.ev-content.ev-section-page__text > ul {
  display: grid; gap: 12px; max-width: none; margin: 0 0 1.4em; padding: 0; list-style: none;
}
.ev-section-page__text > ul li { margin: 0; padding: 18px 20px; border-radius: var(--ev-radius-md); background: var(--ev-bg); line-height: 1.55; }
.ev-section-page__text > ul li strong { display: block; margin-bottom: 4px; font-size: 18px; }
.ev-section-page__text small { color: var(--ev-ink-3); }
@media (min-width: 768px) {
  .ev-content.ev-section-page__text > ul { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .ev-section-page__text { padding: 56px; }
  .ev-section-page__text > p:first-child { font-size: 20px; }
  .ev-content.ev-section-page__text > ul { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}


/* ID field of the hero search: full row on phones */
@media (max-width: 1023px) {
  .ev-hsearch__field--id { grid-column: 1 / -1; }
}

/* Not found (404.php): photo as a backdrop only (TQ 01), text in the white card; search, sections, 3 properties, CTA */
.ev-notfound { padding-bottom: 0; }
.ev-notfound__frame { position: relative; display: grid; border-radius: var(--ev-radius-lg); overflow: hidden; background: var(--ev-cypress-wash); }
.ev-notfound__photo { display: block; width: 100%; height: 180px; object-fit: cover; }
.ev-notfound__card {
  display: grid; gap: 12px; margin: -48px 12px 12px; padding: 24px;
  position: relative; background: var(--ev-surface); border-radius: var(--ev-radius-lg);
}
.ev-notfound__title { margin: 0; line-height: 1.15; }
.ev-notfound__lead { margin: 0; color: var(--ev-ink-2); line-height: 1.6; }
.ev-notfound > .ev-section.ev-notfound__links { margin-top: 48px; }
.ev-notfound__subtitle { margin: 0 0 16px; font-size: var(--ev-fs-body); }
.ev-notfound__links ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ev-notfound__links .ev-btn { gap: 8px; background: var(--ev-surface); }
.ev-notfound + .ev-footer { border-top: 1px solid rgba(255, 255, 255, 0.18); }
@media (max-width: 1023px) {
  .ev-notfound__grid > :nth-child(n+3) { display: none; } /* Two cards while the grid has two columns or one. */
}
@media (max-width: 639px) {
  .ev-notfound__links li { flex: 1 1 100%; }
  .ev-notfound__links .ev-btn { width: 100%; justify-content: space-between; }
}
@media (min-width: 640px) {
  .ev-notfound__photo { height: 260px; }
  .ev-notfound__card { margin: -80px 32px 32px; padding: 32px; }
}
@media (min-width: 1024px) {
  .ev-notfound__frame { min-height: 380px; align-items: center; }
  .ev-notfound__photo { position: absolute; inset: 0; height: 100%; }
  .ev-notfound__card { width: min(560px, 50%); margin: 48px; padding: 36px; }
}
