/**
 * Listings 2026 redesign — Home (index.php) + Find Your Home (find-your-home/index.php)
 * Layouts per the approved mockup artboards Main.dc.html and FindYourHome.dc.html.
 * Linked AFTER theme.css on those two pages only. Accent = var(--primary-color)
 * (each operator's brand colour); white text on accent buttons.
 * The home card itself (.uc-*) lives in unit-cards.css because the state and
 * community pages use it too.
 */

/* ==================== Home: hero search (labeled fields in a white form) ==================== */
.lt-hero .rd-search { gap: 8px; }
.lt-hero .rd-search .search-dropdown {
    flex: 1 1 180px;
    min-width: 0;
    border-radius: 10px;
    background: #F9FAFB;
}
.lt-hero .rd-search .search-dropdown-toggle {
    width: 100%;
    min-height: 56px;
    padding: 8px 12px;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    border-radius: 10px;
}
.lt-hero .rd-search .search-dropdown-toggle:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.rd-field { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.rd-field-label { font-size: 12px; font-weight: 600; line-height: 1.3; color: #4B5563; }
.lt-hero .rd-search .search-dropdown-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: #111827;
    text-transform: none;
    letter-spacing: 0;
}
.lt-hero .rd-search .search-dropdown-arrow { color: #4B5563; }
.lt-hero .rd-search .search-dropdown-menu,
.lt-hero .rd-search .search-dropdown.open .search-dropdown-menu { left: 0; right: auto; transform: none; min-width: 100%; }
.lt-hero .rd-search .search-dropdown-menu { transform: translateY(-8px); }
.lt-hero .rd-search .search-dropdown.open .search-dropdown-menu { transform: translateY(0); }
.lt-hero .rd-search .search-btn { flex: 0 0 auto; min-height: 56px; padding: 0 28px; border-radius: 10px !important; justify-content: center; }
@media (max-width: 768px) {
    .lt-hero .rd-search { flex-direction: row; max-width: 100%; padding: 10px; border-radius: 16px; }
    .lt-hero .rd-search .search-dropdown-toggle { justify-content: space-between; }
    .lt-hero .rd-search .search-btn { flex: 1 1 100%; width: 100%; }
}
.lt-hero-photo { min-height: 440px; }
@media (max-width: 600px) { .lt-hero-photo { min-height: 300px; } }

/* ==================== Home: Available Homes type pills ==================== */
.rd-type-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.rd-type-pill {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid #E5E7EB;
    background: #FFFFFF;
    color: #374151;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.rd-type-pill:hover { border-color: #0D1B2A; color: #0D1B2A; }
.rd-type-pill.is-active { background: #0D1B2A; border-color: #0D1B2A; color: #FFFFFF; font-weight: 600; }
.rd-type-pill:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.rd-home-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; margin-bottom: 0; }
.lt-section .rd-home-grid + * { margin-top: 0; }

/* ==================== Home: Our Communities (horizontal cards) ==================== */
.communities-section { padding: 64px 0; }
.rd-comm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 24px;
}
.rd-comm-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    min-height: 140px;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    overflow: hidden;
    background: #FFFFFF;
    color: #111827;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.rd-comm-card:hover { color: #111827; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(13, 27, 42, 0.10); }
.rd-comm-card:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }
.rd-comm-photo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    color: #9CA3AF;
    font-size: 22px;
}
.rd-comm-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rd-comm-body { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 18px; min-width: 0; }
.rd-comm-name {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.3;
    color: #0D1B2A;
    overflow-wrap: anywhere;
}
.rd-comm-place { font-size: 14px; color: #4B5563; }
.rd-comm-count {
    align-self: flex-start;
    margin-top: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #FFF7ED;
    color: #92400E;
    font-size: 13px;
    font-weight: 600;
}
@media (max-width: 420px) {
    .rd-comm-card { grid-template-columns: 112px minmax(0, 1fr); min-height: 120px; }
    .rd-comm-body { padding: 14px; }
}
.communities-section .see-all-wrap { display: flex; justify-content: center; margin-top: 28px; }

/* ==================== Home: reviews ==================== */
.rd-stars { display: flex; gap: 3px; color: var(--primary-color); }
.rd-stars .rd-star-off { color: #E5E7EB; }

/* ==================== Find Your Home: cream page hero ==================== */
.fyh-hero.rd-fyh-hero {
    background: #FFF7ED;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 48px 0 40px;
}
.rd-fyh-hero h1 {
    margin: 0 0 10px;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(32px, 5vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #0D1B2A;
}
.rd-fyh-hero p { margin: 0; font-size: 17px; line-height: 1.6; color: #4B5563; }

/* ==================== Find Your Home: sidebar + results layout ==================== */
.rd-fyh-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 32px;
    padding-top: 36px;
    padding-bottom: 80px;
}
.rd-fyh-layout::before, .rd-fyh-layout::after { content: none; display: none; }

.fyh-filters.rd-fyh-sidebar {
    flex: 1 1 260px;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    box-shadow: none;
}
.rd-fyh-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rd-fyh-sidebar-title {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #111827;
}
.rd-fyh-sidebar .fyh-clear-btn.rd-clear {
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--lt-link, #B45309);
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
}
.rd-fyh-sidebar .fyh-clear-btn.rd-clear:hover { text-decoration: underline; color: var(--lt-link, #B45309); }
.rd-fyh-sidebar .fyh-filter-group {
    flex: none;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rd-fyh-sidebar .fyh-filter-label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: none;
    letter-spacing: 0;
}
.rd-fyh-sidebar .fyh-input,
.rd-fyh .fyh-sd-toggle {
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid #D1D5DB !important;
    border-radius: 10px !important;
    background: #FFFFFF;
    font-size: 15px;
    color: #111827;
}
.rd-fyh .fyh-sd-text { font-size: 15px; color: #111827; }
.rd-fyh .fyh-sd-menu { border-radius: 10px; }

/* Beds / Baths pill buttons (still the .fyh-sd-option hooks the page JS drives) */
.rd-pills .fyh-sd-options.rd-pill-row {
    display: grid;
    gap: 6px;
    max-height: none;
    overflow: visible;
    padding: 0;
}
.rd-pill-row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rd-pill-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rd-pills .fyh-sd-option {
    min-height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    color: #374151;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.rd-pills .fyh-sd-option:hover { background: #F9FAFB; border-color: #D1D5DB; }
.rd-pills .fyh-sd-option.active {
    border: 1.5px solid var(--primary-color);
    background: #FFF7ED;
    color: #92400E;
    font-weight: 700;
}
.rd-pills .fyh-sd-option:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.rd-price-group .fyh-price-slider { height: 44px; }

/* Results column */
.rd-fyh-results {
    flex: 999 1 560px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.rd-fyh .fyh-results-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
}
.rd-fyh .fyh-results-count {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #374151;
}
.rd-fyh .fyh-results-count strong { color: #111827; font-weight: 700; }
.rd-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #374151; }
.rd-sort .fyh-searchable-dropdown { min-width: 190px; }
.rd-fyh #resultsGrid.units-listing-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 20px;
    margin: 0;
}
.rd-fyh .uc-body { padding: 16px 18px 18px; gap: 6px; }
.rd-fyh .uc-price { font-size: 20px; }

/* Pagination */
.rd-fyh .fyh-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; padding: 0; }
.rd-fyh .fyh-pagination:empty { display: none; }
.rd-fyh .fyh-page-btn {
    min-width: 44px;
    min-height: 44px;
    height: auto;
    padding: 0 8px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
}
.rd-fyh .fyh-page-btn:hover { border-color: #D1D5DB; background: #F9FAFB; color: #111827; box-shadow: none; }
.rd-fyh .fyh-page-btn.active,
.rd-fyh .fyh-page-btn.active:hover { background: #0D1B2A; border-color: #0D1B2A; color: #FFFFFF; font-weight: 600; box-shadow: none; }
.rd-fyh .fyh-page-btn:disabled { opacity: .45; }

@media (max-width: 600px) {
    .rd-fyh-layout { padding-top: 24px; padding-bottom: 56px; gap: 24px; }
    .fyh-filters.rd-fyh-sidebar { padding: 18px; }
    .rd-sort .fyh-searchable-dropdown { min-width: 170px; }
}
