:root {
    --red: #dc1f2e;
    --red-dark: #b61522;
    --blue: #003da5;
    --blue-dark: #002d7a;
    --ink: #172033;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f5f7fb;
    --white: #ffffff;
    --shadow: 0 12px 35px rgba(23, 32, 51, .10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.5;
}

img {
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: inherit;
}

.container {
    width: min(1220px, calc(100% - 40px));
    margin-inline: auto;
}


.brand-banner {
    position: relative;
    z-index: 51;
    background: #00368a;
    border-bottom: 3px solid var(--red);
    box-shadow: 0 6px 20px rgba(0, 45, 122, .14);
}

.brand-banner-inner {
    min-height: 136px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-banner-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.brand-banner-logo img {
    display: block;
    width: 112px;
    height: auto;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .16));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, .8);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    text-decoration: none;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand-remax {
    color: var(--blue);
    font-size: 26px;
}

.brand-radial {
    color: var(--red);
    font-size: 22px;
}

.header-mode {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
    color: #4b5563;
}

.mode-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--red);
    box-shadow: 0 0 0 4px rgba(220, 31, 46, .11);
}

.hero {
    padding: 68px 0 54px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 20%, rgba(255,255,255,.16), transparent 30%),
        linear-gradient(120deg, var(--blue-dark), var(--blue) 62%, #0a58c7);
}

.hero .container {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .15em;
    opacity: .8;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.hero-text {
    max-width: 680px;
    margin: 18px 0 0;
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255,255,255,.82);
}


.business-switch {
    display: inline-flex;
    gap: 4px;
    margin-top: 26px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 12px;
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(8px);
}

.business-switch a {
    min-width: 116px;
    padding: 10px 18px;
    border-radius: 8px;
    color: rgba(255,255,255,.84);
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.business-switch a:hover {
    color: #fff;
    background: rgba(255,255,255,.10);
}

.business-switch a.is-active {
    color: var(--blue-dark);
    background: #fff;
    box-shadow: 0 5px 16px rgba(0,0,0,.14);
}

.hero-stat {
    min-width: 180px;
    padding: 22px 24px;
    border: 1px solid rgba(255,255,255,.23);
    border-radius: 18px;
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(10px);
}

.hero-stat strong {
    display: block;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -.04em;
}

.hero-stat span {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.82);
}

.alert {
    display: flex;
    gap: 10px 18px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
    padding: 15px 18px;
    border-radius: 12px;
    font-size: 14px;
}

.alert-error {
    color: #7f1d1d;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.alert-warning {
    color: #78350f;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.filters-section {
    padding: 34px 0 0;
    background: linear-gradient(#fff, #fff);
}

.filters-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.search-wrap > label,
.field label,
.sort-wrap label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #667085;
}

.search-input-wrap {
    position: relative;
}

.search-input-wrap svg {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    fill: none;
    stroke: #7b8495;
    stroke-width: 2;
    stroke-linecap: round;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #d8dde6;
    border-radius: 10px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.search-input-wrap input {
    padding-left: 45px;
}

input:focus,
select:focus {
    border-color: #6d9de7;
    box-shadow: 0 0 0 4px rgba(0, 61, 165, .10);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.filters-actions {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.sort-wrap {
    width: min(280px, 100%);
}

.button {
    min-height: 44px;
    padding: 10px 17px;
    border: 0;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--red);
}

.button-primary:hover {
    background: var(--red-dark);
    box-shadow: 0 8px 20px rgba(220, 31, 46, .24);
}

.button-secondary {
    color: #374151;
    background: #f3f4f6;
}

.button-secondary:hover {
    background: #e9ebef;
}

.results-bar {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #4b5563;
}

.results-bar strong {
    color: var(--ink);
}

.results-bar small {
    color: #8a93a3;
}

.listings-section {
    padding: 0 0 64px;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.listing-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(23, 32, 51, .055);
    transition: transform .18s ease, box-shadow .18s ease;
}

.listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(23, 32, 51, .11);
}

.listing-card.is-hidden {
    display: none;
}

.listing-image-link {
    display: block;
    text-decoration: none;
}

.listing-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #eef1f5;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.listing-card:hover .listing-image img {
    transform: scale(1.025);
}

.image-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: #9098a7;
    font-weight: 700;
}

.badges {
    position: absolute;
    left: 12px;
    top: 12px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .02em;
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
}

.badge-new {
    color: #fff;
    background: var(--blue);
}

.badge-reduced {
    color: #fff;
    background: var(--red);
}

.listing-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.listing-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.listing-kind {
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
}

.listing-ref {
    color: #9097a5;
    font-size: 11px;
}

.listing-location {
    margin: 7px 0 0;
    min-height: 48px;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -.015em;
}

.listing-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px 10px;
    margin-top: 13px;
}

.listing-price strong {
    font-size: 25px;
    letter-spacing: -.035em;
}

.listing-price del {
    color: #969eab;
    font-size: 14px;
}

.listing-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.listing-features span {
    display: inline-flex;
    gap: 4px;
    padding: 7px 9px;
    border-radius: 8px;
    color: #626b7b;
    background: var(--soft);
    font-size: 12px;
}

.listing-features strong {
    color: #313949;
}

.listing-footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 18px;
}

.agent {
    min-width: 0;
}

.agent-label {
    display: block;
    color: #959cab;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.agent strong {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.listing-footer .button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 13px;
    font-size: 13px;
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    padding-top: 34px;
}

.button-load-more {
    min-width: 210px;
    color: var(--blue);
    background: #eef4ff;
}

.button-load-more:hover {
    background: #e3edff;
}

.button-load-more[hidden] {
    display: none;
}

.empty-state {
    margin: 25px 0;
    padding: 55px 20px;
    border: 1px dashed #cfd5de;
    border-radius: 16px;
    text-align: center;
    background: #fafbfc;
}

.empty-state strong,
.empty-state span {
    display: block;
}

.empty-state span {
    margin-top: 6px;
    color: var(--muted);
}

.site-footer {
    padding: 28px 0;
    color: #d7deea;
    background: #131c2b;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
}

.footer-inner > div {
    display: flex;
    flex-direction: column;
}

.footer-inner strong {
    color: #fff;
}

.footer-inner span {
    font-size: 12px;
    color: #aab4c3;
}

.footer-inner p {
    max-width: 680px;
    margin: 0;
    font-size: 12px;
    text-align: right;
    color: #9ca8b9;
}

@media (max-width: 1050px) {
    .filters-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .listings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 26px, 1220px);
    }

    .brand-banner-inner {
        min-height: 108px;
    }

    .brand-banner-logo img {
        width: 88px;
    }

    .header-inner {
        min-height: 64px;
    }

    .brand-remax {
        font-size: 22px;
    }

    .brand-radial {
        font-size: 19px;
    }

    .header-mode {
        font-size: 12px;
    }

    .hero {
        padding: 48px 0 38px;
    }

    .hero .container {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-stat {
        min-width: 0;
        width: 100%;
    }

    .filters-card {
        padding: 17px;
    }

    .filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filters-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .sort-wrap {
        width: 100%;
    }

    .results-bar {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
        gap: 4px;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-inner p {
        text-align: left;
    }
}

@media (max-width: 460px) {
    .header-mode {
        display: none;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .listing-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .listing-footer .button {
        width: 100%;
    }
}


@media (max-width: 460px) {
    .business-switch {
        width: 100%;
    }

    .business-switch a {
        flex: 1;
        min-width: 0;
    }
}


/* V5 — grandes segmentos Habitação / Comercial */
.field-segment select {
    font-weight: 800;
    color: var(--blue);
    background: #f7faff;
    border-color: #cbdaf3;
}

@media (max-width: 1180px) and (min-width: 1051px) {
    .filters-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ===== Páginas pessoais de consultor ===== */
.personal-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
}

.personal-identity img {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.88);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.personal-identity div {
    display: grid;
    gap: 2px;
}

.personal-identity span {
    color: rgba(255,255,255,.75);
    font-size: 13px;
    font-weight: 700;
}

.personal-identity strong {
    color: #fff;
    font-size: clamp(20px, 3vw, 29px);
    line-height: 1.08;
}

.personal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.personal-actions a {
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.10);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.personal-actions a:hover {
    background: rgba(255,255,255,.20);
}

@media (max-width: 680px) {
    .personal-identity img {
        width: 62px;
        height: 62px;
    }
}
