:root{
    --re-maroon:#9b102b;
    --re-maroon-dark:#7e0d24;
    --re-black:#101014;
    --re-text:#4b5563;
    --re-muted:#6b7280;
    --re-border:#e5e7eb;
    --re-soft:#f8f3f5;
    --re-white:#ffffff;
    --re-green:#15803d;
}

*{
    box-sizing:border-box;
}

body{
    font-family:'Inter', sans-serif;
    background:#fff;
    color:var(--re-black);
}

.real-estate-app-layout{
    background:#fff;
}

/* MOBILE MAIN */

.real-estate-home{
    width:100%;
    max-width:480px;
    margin:0 auto;
    padding:24px 18px 110px;
    background:#fff;
}

.real-estate-sidebar,
.real-estate-right-panel,
.desktop-search-form,
.desktop-workflow-row,
.desktop-property-description{
    display:none;
}

/* HERO */

.real-estate-hero{
    padding-top:10px;
}

.real-estate-header h1{
    margin:0 0 22px;
    color:var(--re-maroon);
    font-size:28px;
    line-height:1.15;
    font-weight:800;
    letter-spacing:-.04em;
}

/* SEARCH */

.real-estate-search-form{
    margin-bottom:18px;
}

.real-estate-search-row{
    display:grid;
    grid-template-columns:1fr 56px;
    gap:12px;
    align-items:center;
    margin-bottom:12px;
}

.real-estate-search{
    height:56px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 18px;
    border:1px solid var(--re-border);
    border-radius:18px;
    background:#fff;
}

.real-estate-search i{
    color:#6b7280;
    font-size:18px;
}

.real-estate-search input{
    width:100%;
    border:none;
    outline:none;
    font-size:15px;
    color:var(--re-black);
    font-family:inherit;
}

.real-estate-search input::placeholder{
    color:#6b7280;
}

.real-estate-filter-btn{
    width:56px;
    height:56px;
    border:1px solid var(--re-border);
    border-radius:18px;
    background:#fff;
    color:#4b5563;
    font-size:20px;
    cursor:pointer;
}

.real-estate-search-submit{
    width:100%;
    height:52px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:none;
    border-radius:14px;
    background:linear-gradient(135deg, var(--re-maroon), var(--re-maroon-dark));
    color:#fff;
    font-family:inherit;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 10px 22px rgba(155,16,43,.18);
}

/* FILTER CHIPS */

.real-estate-filter-chips{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding-bottom:8px;
    margin-bottom:24px;
    scrollbar-width:none;
}

.real-estate-filter-chips::-webkit-scrollbar{
    display:none;
}

.real-estate-filter-chips button{
    flex:0 0 auto;
    border:1px solid var(--re-border);
    background:#fff;
    color:var(--re-black);
    padding:12px 18px;
    border-radius:999px;
    font-size:14px;
    font-weight:700;
    font-family:inherit;
    cursor:pointer;
}

.real-estate-filter-chips button.active{
    background:var(--re-maroon);
    border-color:var(--re-maroon);
    color:#fff;
    box-shadow:0 8px 18px rgba(155,16,43,.18);
}

/* FEATURED CARD */

.featured-property-section{
    margin-bottom:26px;
}

.property-card{
    background:#fff;
    border:1px solid var(--re-border);
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 12px 28px rgba(16,24,40,.08);
}

.property-image-wrap{
    position:relative;
    height:270px;
    overflow:hidden;
}

.property-image-wrap img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

.property-badge{
    position:absolute;
    top:18px;
    z-index:2;
    border-radius:999px;
    padding:9px 14px;
    font-size:13px;
    font-weight:800;
}

.property-badge-left{
    left:18px;
    background:var(--re-maroon);
    color:#fff;
}

.property-badge-right{
    right:18px;
}

.match-badge{
    background:#fff;
    color:var(--re-green);
}

.property-card-body{
    padding:18px;
}

.property-title-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:10px;
}

.property-title-row h2{
    margin:0;
    font-size:25px;
    line-height:1.15;
    font-weight:800;
    letter-spacing:-.03em;
}

.property-title-row strong{
    color:var(--re-maroon);
    font-size:22px;
    font-weight:800;
    white-space:nowrap;
}

.property-location{
    display:flex;
    align-items:center;
    gap:9px;
    color:var(--re-muted);
    font-size:15px;
    margin-bottom:14px;
}

.property-location i{
    color:var(--re-maroon);
}

.property-meta-row{
    display:flex;
    gap:18px;
    flex-wrap:wrap;
    color:var(--re-muted);
    font-size:14px;
    margin-bottom:18px;
}

.property-meta-row span{
    display:flex;
    align-items:center;
    gap:7px;
}

.property-actions{
    display:grid;
    grid-template-columns:1fr 56px;
    gap:12px;
}

.primary-property-btn{
    height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background:linear-gradient(135deg, var(--re-maroon), var(--re-maroon-dark));
    color:#fff;
    text-decoration:none;
    font-size:15px;
    font-weight:800;
}

.save-property-btn{
    height:54px;
    border:1px solid var(--re-border);
    border-radius:12px;
    background:#fff;
    color:var(--re-maroon);
    font-size:22px;
    cursor:pointer;
}

.property-carousel-dots{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin-top:16px;
}

.property-carousel-dots span{
    width:9px;
    height:9px;
    border-radius:999px;
    background:#d1d5db;
}

.property-carousel-dots span.active{
    width:22px;
    background:var(--re-maroon);
}

/* RECOMMENDED */

.recommended-properties-section{
    margin-bottom:24px;
}

.section-title-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:14px;
}

.section-title-row h2{
    margin:0;
    font-size:21px;
    font-weight:800;
    letter-spacing:-.03em;
}

.section-title-row a{
    color:var(--re-maroon);
    text-decoration:none;
    font-weight:800;
    font-size:15px;
}

.recommended-property-row{
    display:grid;
    grid-template-columns:repeat(3, minmax(150px, 1fr));
    gap:14px;
    overflow-x:auto;
    padding-bottom:8px;
    scrollbar-width:none;
}

.recommended-property-row::-webkit-scrollbar{
    display:none;
}

.mini-property-card{
    min-width:150px;
    border:1px solid var(--re-border);
    border-radius:14px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 8px 20px rgba(16,24,40,.06);
}

.mini-property-image{
    position:relative;
    height:115px;
}

.mini-property-image img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}

.mini-property-image span{
    position:absolute;
    right:8px;
    bottom:8px;
    padding:6px 9px;
    border-radius:999px;
    background:#fff;
    color:var(--re-green);
    font-size:11px;
    font-weight:800;
}

.mini-property-body{
    padding:12px;
}

.mini-property-body h3{
    margin:0 0 7px;
    font-size:13px;
    line-height:1.2;
    font-weight:800;
}

.mini-property-body p{
    margin:0 0 10px;
    color:var(--re-muted);
    font-size:12px;
    line-height:1.3;
}

.mini-property-body strong{
    color:var(--re-maroon);
    font-size:14px;
    font-weight:800;
}

/* PREMIUM MOBILE */

.premium-benefits-card{
    display:grid;
    grid-template-columns:58px 1fr;
    gap:14px;
    align-items:center;
    padding:18px;
    border-radius:18px;
    background:linear-gradient(135deg, #fbf2f4, #fff);
    border:1px solid #f1d9df;
}

.premium-icon{
    width:54px;
    height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:linear-gradient(135deg, var(--re-maroon), var(--re-maroon-dark));
    color:#fff;
    font-size:23px;
}

.premium-copy h2{
    margin:0 0 6px;
    font-size:17px;
    font-weight:800;
}

.premium-copy p{
    margin:0;
    color:var(--re-text);
    font-size:14px;
    line-height:1.45;
}

.premium-btn{
    grid-column:1 / -1;
    height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--re-maroon);
    border-radius:12px;
    color:var(--re-maroon);
    text-decoration:none;
    font-weight:800;
}

/* MOBILE NAV */

.real-estate-mobile-nav{
    position:sticky;
    left:0;
    right:0;
    bottom:0;
    z-index:100;
    max-width:480px;
    margin:0 auto;
    height:78px;
    display:grid;
    grid-template-columns:repeat(5, 1fr);
    align-items:center;
    background:#fff;
    border-top:1px solid var(--re-border);
    box-shadow:0 -10px 25px rgba(16,24,40,.08);
}

.real-estate-mobile-nav a{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:5px;
    text-decoration:none;
    color:#6b7280;
    font-size:12px;
    font-weight:600;
}

.real-estate-mobile-nav a i{
    font-size:21px;
}

.real-estate-mobile-nav a.active{
    color:var(--re-maroon);
}

/* ==========================================
   PROPERTY SEARCH MODAL
========================================== */

.property-search-modal{
    position:fixed;
    inset:0;
    z-index:2147483647;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(16,16,20,.65);
}

.property-search-modal.active{
    display:flex;
}

.property-search-modal-card{
    position:relative;
    z-index:2147483647;
    width:100%;
    max-width:430px;
    padding:28px 22px;
    border-radius:22px;
    background:#fff;
    box-shadow:0 24px 70px rgba(16,24,40,.25);
}

.property-search-modal-close{
    position:absolute;
    top:14px;
    right:14px;
    width:36px;
    height:36px;
    border:none;
    border-radius:999px;
    background:#f3f4f6;
    color:#4b5563;
    cursor:pointer;
}

.property-search-loading,
.property-search-lead-capture{
    text-align:center;
}

.property-search-loading.hidden{
    display:none;
}

.property-search-lead-capture{
    display:none;
}

.property-search-lead-capture.active{
    display:block;
}

.property-search-spinner{
    width:54px;
    height:54px;
    margin:0 auto 18px;
    border-radius:999px;
    border:5px solid #f1d9df;
    border-top-color:var(--re-maroon);
    animation:propertySearchSpin .8s linear infinite;
}

@keyframes propertySearchSpin{
    to{
        transform:rotate(360deg);
    }
}

.property-search-modal h2{
    margin:0 0 10px;
    font-size:22px;
    font-weight:800;
    color:var(--re-black);
}

.property-search-modal p{
    margin:0 0 18px;
    color:var(--re-text);
    font-size:14px;
    line-height:1.55;
}

.property-search-modal-icon{
    width:58px;
    height:58px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 16px;
    border-radius:999px;
    background:linear-gradient(
        135deg,
        var(--re-maroon),
        var(--re-maroon-dark)
    );
    color:#fff;
    font-size:24px;
}

.property-alert-form{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.property-alert-form input{
    width:100%;
    height:50px;
    border:1px solid var(--re-border);
    border-radius:12px;
    padding:0 14px;
    font-family:inherit;
    font-size:14px;
    outline:none;
}

.property-alert-form input:focus{
    border-color:var(--re-maroon);
    box-shadow:0 0 0 3px rgba(155,16,43,.10);
}

.property-alert-form button{
    height:52px;
    border:none;
    border-radius:12px;
    background:linear-gradient(
        135deg,
        var(--re-maroon),
        var(--re-maroon-dark)
    );
    color:#fff;
    font-family:inherit;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
}
/* DESKTOP */

@media (min-width:1024px){

    body{
        background:#fff;
        overflow-x:hidden;
    }

    .real-estate-app-layout{
        display:grid;
        grid-template-columns:280px minmax(0, 1fr) 360px;
        min-height:100vh;
    }

    .real-estate-sidebar{
        display:flex;
        flex-direction:column;
        position:sticky;
        top:0;
        height:100vh;
        padding:28px 16px;
        border-right:1px solid var(--re-border);
        background:#fff;
    }

    .sidebar-brand{
        display:flex;
        gap:14px;
        align-items:flex-start;
        margin-bottom:34px;
    }

    .sidebar-brand-icon{
        width:46px;
        height:46px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:12px;
        background:var(--re-maroon);
        color:#fff;
        font-size:24px;
    }

    .sidebar-brand h2{
        margin:0;
        color:var(--re-maroon);
        font-size:21px;
        line-height:1.12;
        font-weight:800;
    }

    .sidebar-brand p{
        margin:6px 0 0;
        color:var(--re-text);
        font-size:13px;
    }

    .sidebar-nav{
        display:flex;
        flex-direction:column;
        gap:8px;
    }

    .sidebar-nav a{
        display:flex;
        align-items:center;
        gap:14px;
        height:52px;
        padding:0 16px;
        border-radius:12px;
        color:var(--re-text);
        text-decoration:none;
        font-size:15px;
        font-weight:700;
    }

    .sidebar-nav a i{
        width:20px;
        color:#6b7280;
        font-size:18px;
    }

    .sidebar-nav a.active{
        background:#fbf0f3;
        color:var(--re-maroon);
        border-left:4px solid var(--re-maroon);
    }

    .sidebar-nav a.active i{
        color:var(--re-maroon);
    }

    .sidebar-premium-card{
        margin-top:auto;
        padding:18px;
        border:1px solid #f1d9df;
        border-radius:16px;
        background:linear-gradient(135deg, #fbf2f4, #fff);
    }

    .sidebar-premium-card h3{
        margin:14px 0 6px;
        color:var(--re-maroon);
        font-size:15px;
        font-weight:800;
    }

    .sidebar-premium-card p{
        margin:0 0 16px;
        color:var(--re-text);
        font-size:13px;
        line-height:1.45;
    }

    .sidebar-premium-card a{
        height:44px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:9px;
        background:linear-gradient(135deg, var(--re-maroon), var(--re-maroon-dark));
        color:#fff;
        text-decoration:none;
        font-size:13px;
        font-weight:800;
    }

    .real-estate-home{
        max-width:none;
        padding:32px 28px 36px;
        overflow:hidden;
    }

    .desktop-hero-row{
        display:grid;
        grid-template-columns:minmax(320px, 1fr) minmax(360px, 520px);
        gap:24px;
        align-items:start;
    }

    .real-estate-header h1{
        font-size:28px;
        margin-bottom:20px;
    }

    .mobile-search-form{
        display:none;
    }

    .desktop-search-form{
        display:block;
        margin-bottom:0;
    }

    .desktop-search-form .real-estate-search-row{
        grid-template-columns:1fr 48px;
        margin-bottom:10px;
    }

    .desktop-search-form .real-estate-search,
    .desktop-search-form .real-estate-filter-btn{
        height:48px;
        border-radius:12px;
    }

    .desktop-search-form .real-estate-search-submit{
        height:44px;
        border-radius:11px;
        font-size:14px;
    }

    .real-estate-filter-chips{
        margin-bottom:22px;
        overflow:visible;
        flex-wrap:wrap;
        margin-top:24px;
    }

    .real-estate-filter-chips button{
        padding:10px 18px;
        font-size:13px;
    }

    .featured-property-card{
        display:grid;
        grid-template-columns:minmax(0, 2fr) minmax(260px, .9fr);
        min-height:330px;
    }

    .property-image-wrap{
        height:100%;
        min-height:330px;
    }

    .property-card-body{
        display:flex;
        flex-direction:column;
        padding:24px;
    }

    .property-title-row{
        display:block;
    }

    .property-title-row h2{
        font-size:22px;
        margin-bottom:16px;
    }

    .property-title-row strong{
        display:block;
        font-size:25px;
    }

    .desktop-property-description{
        display:block;
        color:var(--re-text);
        font-size:13px;
        line-height:1.65;
        margin:0 0 auto;
    }

    .property-actions{
        margin-top:24px;
    }

    .recommended-properties-section{
        border:1px solid var(--re-border);
        border-radius:16px;
        padding:18px;
        margin-bottom:20px;
    }

    .recommended-property-row{
        grid-template-columns:repeat(3, 1fr);
        overflow:visible;
    }

    .mini-property-card{
        min-width:0;
    }

    .mini-property-image{
        height:150px;
    }

    .mini-property-body h3{
        font-size:14px;
    }

    .mobile-premium-card,
    .real-estate-mobile-nav{
        display:none;
    }

    .desktop-workflow-row{
        display:grid;
        grid-template-columns:repeat(5, 1fr);
        gap:0;
        border:1px solid var(--re-border);
        border-radius:16px;
        background:#fff;
        overflow:hidden;
    }

    .workflow-item{
        padding:20px 16px;
        border-right:1px solid var(--re-border);
    }

    .workflow-item:last-child{
        border-right:none;
    }

    .workflow-item div{
        width:42px;
        height:42px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:12px;
        background:#fbf0f3;
        color:var(--re-maroon);
        font-size:18px;
        margin-bottom:10px;
    }

    .workflow-item h3{
        margin:0 0 5px;
        font-size:14px;
        font-weight:800;
    }

    .workflow-item p{
        margin:0;
        color:var(--re-text);
        font-size:11px;
        line-height:1.45;
    }

    .real-estate-right-panel{
        display:flex;
        flex-direction:column;
        gap:18px;
        padding:145px 24px 28px 0;
    }

    .desktop-side-card{
        border:1px solid var(--re-border);
        border-radius:16px;
        background:#fff;
        padding:18px;
    }

    .side-card-header{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:16px;
    }

    .side-card-header h2{
        margin:0;
        font-size:17px;
        font-weight:800;
    }

    .side-card-header a{
        color:var(--re-maroon);
        text-decoration:none;
        font-size:13px;
        font-weight:800;
    }

    .tour-list{
        display:flex;
        flex-direction:column;
        gap:14px;
    }

    .tour-card{
        display:grid;
        grid-template-columns:86px 1fr 14px;
        gap:12px;
        align-items:center;
        padding-bottom:14px;
        border-bottom:1px solid var(--re-border);
    }

    .tour-card:last-child{
        border-bottom:none;
    }

    .tour-card img{
        width:86px;
        height:76px;
        border-radius:10px;
        object-fit:cover;
    }

    .tour-card h3{
        margin:0 0 4px;
        font-size:13px;
        font-weight:800;
    }

    .tour-card p,
    .tour-card span{
        display:block;
        margin:0 0 4px;
        color:var(--re-text);
        font-size:11px;
    }

    .tour-card strong{
        display:block;
        margin:4px 0;
        font-size:11px;
        line-height:1.35;
    }

    .tour-card small{
        display:inline-flex;
        width:max-content;
        padding:4px 8px;
        border-radius:999px;
        background:#e8f1ff;
        color:#2563eb;
        font-size:10px;
        font-weight:800;
    }

    .tour-card > i{
        color:#9ca3af;
    }

    .side-outline-btn{
        height:44px;
        display:flex;
        align-items:center;
        justify-content:center;
        margin-top:14px;
        border:1px solid var(--re-maroon);
        border-radius:10px;
        color:var(--re-maroon);
        text-decoration:none;
        font-size:13px;
        font-weight:800;
    }

    .insight-list{
        display:flex;
        flex-direction:column;
        gap:16px;
    }

    .insight-item{
        display:grid;
        grid-template-columns:42px 1fr auto;
        gap:12px;
        align-items:center;
        padding-bottom:16px;
        border-bottom:1px solid var(--re-border);
    }

    .insight-item:last-child{
        border-bottom:none;
    }

    .insight-icon{
        width:42px;
        height:42px;
        display:flex;
        align-items:center;
        justify-content:center;
        border-radius:999px;
        background:var(--re-maroon);
        color:#fff;
    }

    .insight-item p{
        margin:0 0 3px;
        color:var(--re-text);
        font-size:12px;
        font-weight:700;
    }

    .insight-item strong{
        font-size:20px;
        font-weight:800;
    }

    .insight-item span{
        color:var(--re-green);
        font-size:12px;
        font-weight:800;
        text-align:right;
    }

    .insight-item small{
        display:block;
        color:var(--re-muted);
        font-size:10px;
        font-weight:500;
    }
}

@media (min-width:1024px) and (max-width:1280px){
    .real-estate-app-layout{
        grid-template-columns:250px minmax(0, 1fr);
    }

    .real-estate-right-panel{
        display:none;
    }
}

@media (max-width:380px){
    .real-estate-home{
        padding-left:14px;
        padding-right:14px;
    }

    .real-estate-header h1{
        font-size:25px;
    }

    .property-image-wrap{
        height:230px;
    }

    .property-title-row h2{
        font-size:21px;
    }

    .property-title-row strong{
        font-size:19px;
    }
}