/* ==========================================================================
   Zillow-style homepage (scoped to .zh-home so no other page is affected)
   Layout mirrors zillow.com; palette/branding stays Volnyn.
   ========================================================================== */

.zh-home {
    --zh-ink: #2a2a33;
    --zh-muted: #596776;
    --zh-line: #d1d1d6;
    --zh-line-soft: #e8ecef;
    --zh-surface: #f7f8fa;
    --zh-accent: var(--primary-color, #22c55e);
    --zh-max: 1280px;

    color: var(--zh-ink);
    background: #fff;
}

.zh-home .zh-container {
    width: 100%;
    max-width: var(--zh-max);
    margin: 0 auto;
    padding: 0 24px;
}

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

.zh-home .zh-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, #1f2a37 0%, #38495c 100%);
    background-size: cover;
    background-position: center 62%;
    background-repeat: no-repeat;
}

.zh-home .zh-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 62%;
}

.zh-home .zh-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 22, 30, .34) 0%, rgba(16, 22, 30, .10) 42%, rgba(16, 22, 30, .26) 100%);
}

.zh-home .zh-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 780px;
    padding: 96px 24px 72px;
    text-align: center;
}

.zh-home .zh-hero__title {
    margin: 0 0 28px;
    color: #fff;
    font-size: 46px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.zh-home .zh-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 660px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
    overflow: hidden;
}

.zh-home .zh-search__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 60px;
    padding: 0 16px 0 22px;
    border: 0;
    outline: 0;
    font-size: 17px;
    color: var(--zh-ink);
    background: transparent;
}

.zh-home .zh-search__input::placeholder {
    color: #8e9aab;
}

.zh-home .zh-search__btn {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--zh-accent);
    cursor: pointer;
    transition: background .18s ease;
}

.zh-home .zh-search__btn:hover {
    background: rgba(34, 197, 94, .1);
}

/* ------------------------------------------------- buy / sell / rent ----- */

.zh-home .zh-actions {
    padding: 64px 0 8px;
}

.zh-home .zh-actions__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.zh-home .zh-action {
    text-align: center;
    padding: 8px 12px 32px;
}

.zh-home .zh-action__art {
    width: 190px;
    height: 142px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--zh-surface);
    color: var(--zh-accent);
}

.zh-home .zh-action__art svg {
    width: 150px;
    height: 112px;
}

.zh-home .zh-action__art--sell {
    background: #f2f7ff;
    color: #3d7dfb;
}

.zh-home .zh-action__art--rent {
    background: #fff6ec;
    color: #e79a3c;
}

.zh-home .zh-action__title {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--zh-ink);
}

.zh-home .zh-action__text {
    margin: 0 auto 24px;
    max-width: 340px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--zh-muted);
}

.zh-home .zh-btn-outline {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--zh-accent);
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    color: var(--zh-accent);
    background: #fff;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.zh-home .zh-btn-outline:hover {
    background: var(--zh-accent);
    color: #fff;
}

.zh-home .zh-btn-solid {
    flex: 0 0 auto;
    display: inline-block;
    padding: 13px 30px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: var(--zh-accent);
    text-decoration: none;
    transition: filter .18s ease;
}

.zh-home .zh-btn-solid:hover {
    filter: brightness(.94);
    color: #fff;
}

/* ------------------------------------------------------------ rails ------ */

.zh-home .zh-rail-section {
    padding: 48px 0 56px;
}

.zh-home .zh-rail-section--alt {
    background: var(--zh-surface);
}

.zh-home .zh-rail-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.zh-home .zh-rail-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--zh-ink);
}

.zh-home .zh-rail-sub {
    margin: 6px 0 0;
    font-size: 15px;
    color: var(--zh-muted);
}

.zh-home .zh-rail-nav {
    display: flex;
    gap: 10px;
}

.zh-home .zh-rail-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--zh-line);
    border-radius: 50%;
    background: #fff;
    color: var(--zh-ink);
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, opacity .18s ease;
}

.zh-home .zh-rail-btn:hover:not(:disabled) {
    border-color: var(--zh-accent);
    color: var(--zh-accent);
}

.zh-home .zh-rail-btn:disabled {
    opacity: .35;
    cursor: default;
}

.zh-home .zh-rail {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 4px 2px 12px;
    margin: 0 -2px;
}

.zh-home .zh-rail::-webkit-scrollbar {
    display: none;
}

.zh-home .zh-rail__item {
    flex: 0 0 auto;
    width: calc((100% - 60px) / 4);
    min-width: 260px;
    scroll-snap-align: start;
}

.zh-home .zh-rail__item > .property-item {
    height: 100%;
}

.zh-home .zh-rail-foot {
    margin-top: 12px;
}

.zh-home .zh-link-strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--zh-accent);
    text-decoration: none;
}

.zh-home .zh-link-strong:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------- band ------ */

.zh-home .zh-band {
    background: rgba(34, 197, 94, .08);
    border-top: 1px solid rgba(34, 197, 94, .16);
    border-bottom: 1px solid rgba(34, 197, 94, .16);
    padding: 34px 0;
}

.zh-home .zh-band__inner {
    display: flex;
    align-items: center;
    gap: 22px;
}

.zh-home .zh-band__art {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--zh-accent);
}

.zh-home .zh-band__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.zh-home .zh-band__title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: var(--zh-ink);
}

.zh-home .zh-band__text {
    margin: 0;
    font-size: 16px;
    color: var(--zh-muted);
}

/* ----------------------------------------------------------- cities ------ */

.zh-home .zh-cities {
    padding: 56px 0 72px;
}

.zh-home .zh-cities__title {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 700;
    color: var(--zh-ink);
}

.zh-home .zh-cities__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px 32px;
}

.zh-home .zh-cities__grid a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--zh-line-soft);
    font-size: 16px;
    color: var(--zh-ink);
    text-decoration: none;
}

.zh-home .zh-cities__grid a:hover {
    color: var(--zh-accent);
}

.zh-home .zh-cities__count {
    font-size: 13px;
    font-weight: 600;
    color: #8e9aab;
}

/* ------------------------------------------------------- responsive ------ */

@media (max-width: 1199px) {
    .zh-home .zh-rail__item {
        width: calc((100% - 40px) / 3);
    }

    .zh-home .zh-cities__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .zh-home .zh-hero {
        min-height: 420px;
    }

    .zh-home .zh-hero__title {
        font-size: 34px;
    }

    .zh-home .zh-actions__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .zh-home .zh-rail__item {
        width: calc((100% - 20px) / 2);
    }

    .zh-home .zh-cities__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .zh-home .zh-container {
        padding: 0 16px;
    }

    .zh-home .zh-hero__inner {
        padding: 72px 16px 56px;
    }

    .zh-home .zh-hero__title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .zh-home .zh-search__input {
        height: 52px;
        font-size: 15px;
        padding-left: 16px;
    }

    .zh-home .zh-search__btn {
        width: 52px;
        height: 52px;
    }

    .zh-home .zh-rail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .zh-home .zh-rail-title,
    .zh-home .zh-cities__title {
        font-size: 23px;
    }

    .zh-home .zh-rail__item {
        width: 84%;
        min-width: 0;
    }

    .zh-home .zh-band__inner {
        flex-direction: column;
        text-align: center;
    }

    .zh-home .zh-cities__grid {
        grid-template-columns: 1fr;
    }
}
