/*
 * Home page sections added with the search-first hero: Browse projects, You viewed, New this month, the
 * "Not sure where to start?" strip and the phone/tablet quick-action bar. Colours are the site's own:
 * near-black #111418 / var(--black-background-color), greys, white.
 */
.home-section-title { margin: 0; font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; color: var(--black-font-color, #000c14); }
.home-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.home-text-button { border: 0; background: transparent; padding: 6px 0; font-size: 14px; font-weight: 700; color: var(--black-font-color, #000c14) !important; text-decoration: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.home-text-button:hover { text-decoration: underline; }

.home-chip {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 20px;
    background: #f1f3f5; color: #111418 !important; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
    border: 1px solid transparent; transition: background .15s ease, border-color .15s ease;
}
.home-chip:hover { background: #e7eaee; border-color: #cfd5dc; }
.home-chip--gold { gap: 6px; background: #fbf4dc; border-color: #ecd690; color: #5c4510 !important; }
.home-chip--gold svg { color: #c9a227; flex: none; }
.home-chip--gold:hover { background: #f7ebc2; border-color: #d9bb5c; }

/* Browse projects */
.home-browse { padding: 40px 0 12px; }
.home-browse .home-section-title { margin-bottom: 18px; }
.home-browse__emirates { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 26px; }
.home-browse__emirate {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 80px; padding: 0 20px;
    border: 1px solid #e3e6ea; border-radius: 14px; background: #ffffff; color: #111418 !important; text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.home-browse__emirate:hover { border-color: #111418; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.home-browse__emirate span { display: flex; flex-direction: column; gap: 3px; }
.home-browse__emirate strong { font-size: 17px; font-weight: 800; }
.home-browse__emirate small { font-size: 13px; color: #4b5563; }
.home-browse__rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; }
.home-browse__label { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #4b5563; letter-spacing: .02em; }
.home-browse__chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* You viewed */
.home-viewed { padding: 28px 0 8px; }
.home-viewed[hidden] { display: none; }
.home-viewed__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.home-viewed__card {
    display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #e3e6ea; border-radius: 12px;
    color: #111418 !important; text-decoration: none; background: #fff; min-width: 0;
}
.home-viewed__card:hover { border-color: #111418; }
.home-viewed__card img { flex: none; width: 96px; height: 72px; border-radius: 8px; object-fit: cover; background: #f1f3f5; }
.home-viewed__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.home-viewed__title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-viewed__meta { font-size: 12.5px; color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-viewed__price { font-size: 13.5px; font-weight: 700; }

/* New this month / Most viewed: one row of cards, a sideways scroll on narrow screens instead of a second carousel. */
.home-recent, .home-most-viewed { padding: 36px 0 8px; }
.home-section-sub { margin: 4px 0 0; font-size: 14px; color: #4b5563; }
.home-card-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.home-card-row__item { min-width: 0; }
@media (max-width: 991.98px) {
    .home-card-row {
        display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
        /* Bleeds to the screen edges (the home page's 16px gutter, below) but the first card lines up with the
           text; scroll-padding keeps snapping from scrolling it under the edge. */
        margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px;
        scrollbar-width: thin;
    }
    .home-card-row__item { flex: 0 0 min(84%, 360px); scroll-snap-align: start; }
}

/* Not sure where to start? */
.home-lead { background: #111418; color: #ffffff; margin: 40px 0 0; }
.home-lead__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 32px; padding-top: 30px; padding-bottom: 30px; flex-wrap: wrap; }
.home-lead__text h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: #ffffff; }
.home-lead__text p { margin: 0; font-size: 14.5px; color: #e5e7eb; }
.home-lead__form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.home-lead__form select, .home-lead__form input {
    height: 48px; padding: 0 14px; border: 0; border-radius: 10px; font-size: 15px; color: #111418; background: #ffffff; min-width: 0;
}
.home-lead__form select { width: 180px; }
.home-lead__form input { width: 210px; }
.home-lead__send {
    height: 48px; padding: 0 22px; border: 0; border-radius: 10px; font-size: 15px; font-weight: 800; cursor: pointer;
    background: #e2b93b; color: #111418;
}
.home-lead__send:hover { background: #d4aa2b; }
@media (max-width: 767.98px) {
    .home-lead__form { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .home-lead__form select, .home-lead__form input { width: 100%; font-size: 16px; }
    .home-lead__send { grid-column: 1 / -1; }
}

/* Phone and tablet quick-action bar */
.home-mobile-bar { display: none; }
@media (max-width: 991.98px) {
    .home-mobile-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
        height: 64px; padding-bottom: env(safe-area-inset-bottom, 0); background: #ffffff; border-top: 1px solid #e3e6ea;
        box-shadow: 0 -6px 18px rgba(16, 24, 40, .06);
    }
    .home-mobile-bar a {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        font-size: 12px; font-weight: 700; color: #111418 !important; text-decoration: none;
    }
    .home-mobile-bar__wa { color: #146c3a !important; }
    /* Room for the bar at the end of the page, and the privacy notice sits above it. */
    body { padding-bottom: 64px; }
    .ua-consent { bottom: 76px !important; }
}

@media (max-width: 991.98px) {
    /* One 16px gutter on both sides for every section of the home page's content (this file loads only on the
       home page): the new sections used 16px and the older ones about 11px, so left edges did not line up. */
    body .container { padding-left: 16px; padding-right: 16px; }
    .home-browse .home-browse__chips { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
}

@media (max-width: 767.98px) {
    .home-browse { padding-top: 28px; }
    .home-browse__emirates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .home-browse__emirate { min-height: 64px; padding: 0 14px; }
    .home-browse__emirate svg { display: none; }
    .home-browse__rows { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    /* One line per row on a phone: the chips scroll sideways rather than stacking four rows deep. */
    .home-browse__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .home-browse__chips::-webkit-scrollbar { display: none; }
}

/* The slim search bar that slides in once the hero's search card has scrolled away (desktop and tablet). It sits just
   under the site's own fixed header (#sidebar, z-index 1000; its top is set by the script), and below it in the
   stacking order so the header's menus still open over it. */
.home-stickybar {
    position: fixed; top: var(--hss-top, 0px); left: 0; right: 0; z-index: 999; padding: 10px 0;
    background: rgba(255, 255, 255, .97); border-bottom: 1px solid #e3e6ea; box-shadow: 0 8px 22px rgba(16, 24, 40, .08);
    transform: translateY(-110%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
}
.home-stickybar.is-on { transform: none; visibility: visible; transition: transform .22s ease, visibility 0s; }
.home-stickybar__inner { display: flex; align-items: center; gap: 12px; }
.home-stickybar .ais-bar { flex: 1; min-width: 0; box-shadow: none; padding: 3px 3px 3px 14px; }
.home-stickybar .ais-bar input[type=search] { padding: 7px 4px; font-size: 15px; }
.home-stickybar .ais-go { padding: 9px 20px; font-size: 14px; }
.home-stickybar__map { flex: none; height: 44px; }
@media (max-width: 767.98px) { .home-stickybar { display: none; } }
@media (prefers-reduced-motion: reduce) { .home-stickybar, .home-stickybar.is-on { transition: none; } }

/* "Get new launches in your budget": opens the site's own saved-search alert dialog. */
.home-alerts { padding: 36px 0 0; }
.home-alerts__card {
    display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap;
    padding: 22px 24px; border: 1px solid #ecd690; border-radius: 16px; background: linear-gradient(135deg, #fffaf0, #fbf4dc);
}
.home-alerts__text { display: flex; align-items: flex-start; gap: 14px; flex: 1 1 320px; min-width: 0; }
.home-alerts__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: #8a6a12; border: 1px solid #ecd690; }
.home-alerts__text h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: #111418; }
.home-alerts__text p { margin: 0; font-size: 14px; color: #4b5563; line-height: 1.5; }
.home-alerts__form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1 1 420px; justify-content: flex-end; }
.home-alerts__form .form-select { height: 48px; border: 1px solid #d9dde6; border-radius: 12px; font-size: 15px; min-width: 0; flex: 1 1 150px; max-width: 220px; background-color: #fff; color: #1c2430 !important; }
.home-alerts__go {
    height: 48px; padding: 0 24px; border: 0; border-radius: 999px; font-weight: 800; font-size: 15px; cursor: pointer;
    background: var(--black-background-color, #171617); color: #fff;
}
.home-alerts__go:hover { background: #000; }
@media (max-width: 767.98px) {
    .home-alerts__card { padding: 18px 16px; }
    .home-alerts__form { justify-content: stretch; }
    .home-alerts__form .form-select { max-width: none; font-size: 16px; }
    .home-alerts__go { flex: 1 1 100%; }
}


/* Payment plan calculator */
.home-calc { padding: 36px 0 8px; }
.home-calc__card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; padding: 22px; border: 1px solid #e3e6ea; border-radius: 16px; background: #fff; }
.home-calc__inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; margin: 0; }
.home-calc__field { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.home-calc__field:first-child { grid-column: 1 / -1; }
.home-calc__field > span { font-size: 12.5px; font-weight: 700; color: #4b5563; }
.home-calc__field small { font-size: 12px; color: #6b7280; }
.home-calc__field input, .home-calc__field .form-select {
    height: 48px; border: 1px solid #d9dde6; border-radius: 12px; padding: 0 14px; font-size: 16px; color: #1c2430; background-color: #fff; width: 100%;
}
.home-calc__field input[data-calc-price] { font-size: 20px; font-weight: 800; }
.home-calc__field input:focus, .home-calc__field .form-select:focus { outline: 0; border-color: var(--black-background-color, #171617); box-shadow: none; }
.home-calc__fee-other { margin-top: 6px; }
.home-calc__results { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; background: #f6f7f9; }
.home-calc__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e6e8ee; }
.home-calc__row[hidden] { display: none; }
.home-calc__row > span { display: flex; flex-direction: column; font-size: 14.5px; font-weight: 700; color: #1c2430; min-width: 0; }
.home-calc__row > span small { font-size: 12.5px; font-weight: 500; color: #6b7280; margin-top: 2px; }
.home-calc__row > strong { font-size: 17px; font-weight: 800; color: #111418; white-space: nowrap; }
.home-calc__row--now > strong { font-size: 20px; }
.home-calc__row--total { border-bottom: 0; }
.home-calc__row--total > span { font-weight: 600; color: #4b5563; }
.home-calc__find {
    margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 999px;
    background: var(--black-background-color, #171617); color: #fff !important; font-weight: 800; font-size: 15px; text-decoration: none;
}
.home-calc__find:hover { background: #000; }
.home-calc__note { margin: 8px 0 0; font-size: 12px; color: #6b7280; }
@media (max-width: 991.98px) {
    .home-calc__card { grid-template-columns: minmax(0, 1fr); padding: 16px; }
}
@media (max-width: 575.98px) {
    .home-calc__inputs { grid-template-columns: minmax(0, 1fr); }
}
