/* ===================================
   SITE PÚBLICO - SobGestão Portal
   Identidade Visual: Dark Sophisticated
   Paleta: #060E18 | #272722 | #8F948E | #CBD0CC | #F5E0D3
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --black:        #060E18;
    --charcoal:     #272722;
    --gray-mid:     #8F948E;
    --gray-light:   #CBD0CC;
    --cream:        #F5E0D3;

    --white:        #ffffff;
    --bg:           #F7F6F4;
    --border:       #E2E0DB;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    color: var(--charcoal);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(6,14,24,.06);
}

.site-header .navbar {
    padding: .75rem 0;
}

/* Logo — usa logo.png (escuro, fundo transparente, já recortado) */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

.navbar-brand img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* Nav links */
.nav-link {
    color: var(--charcoal) !important;
    font-weight: 500;
    font-size: .9rem;
    letter-spacing: .01em;
    padding: .5rem .9rem !important;
    border-radius: 6px;
    transition: background .15s, color .15s;
}

.nav-link:hover {
    color: var(--black) !important;
    background: var(--bg);
}

.navbar-toggler {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .35rem .6rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(6,14,24,.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Botão entrar / admin */
.btn-header-cta {
    background: var(--black);
    color: var(--white) !important;
    font-weight: 600;
    font-size: .875rem;
    padding: .5rem 1.25rem;
    border-radius: 8px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .2s;
}
.btn-header-cta:hover { background: var(--charcoal); color: var(--white) !important; }

/* Botão primário global */
.btn-primary-portal {
    background: var(--black);
    color: var(--white);
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    border-radius: 8px;
    padding: .55rem 1.3rem;
    transition: background .2s, transform .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.btn-primary-portal:hover {
    background: var(--charcoal);
    color: var(--white);
    transform: translateY(-1px);
}

/* =============================================
   HERO
   ============================================= */
.hero-section {
    position: relative;
    min-height: 580px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--black);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(6,14,24,.92) 38%, rgba(6,14,24,.45) 65%, rgba(6,14,24,.15) 100%),
        url('/images/hero-bg.jpg') center center / cover no-repeat;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 5rem 0 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(245,224,211,.12);
    border: 1px solid rgba(245,224,211,.25);
    color: var(--cream);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .35rem .9rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.12;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: -.02em;
}

.hero-title span { color: var(--cream); }

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--gray-light);
    margin-bottom: 2.5rem;
    font-weight: 400;
    max-width: 460px;
}

.search-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(6,14,24,.18);
    max-width: 520px;
}

.search-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gray-mid);
    margin-bottom: .35rem;
    display: block;
}

.search-input {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: .6rem .9rem;
    font-family: var(--font-body);
    font-size: .9rem;
    width: 100%;
    transition: border-color .2s;
    background: var(--bg);
    color: var(--charcoal);
}

.search-input:focus {
    outline: none;
    border-color: var(--charcoal);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(39,39,34,.06);
}

.btn-search {
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: .75rem 1.5rem;
    font-weight: 700;
    font-size: .95rem;
    font-family: var(--font-body);
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: background .2s, transform .15s;
    margin-top: .5rem;
}

.btn-search:hover {
    background: var(--charcoal);
    transform: translateY(-1px);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 1.5rem 0 0;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 2rem;
}

.stat-item {
    padding-right: 2.5rem;
    border-right: 1px solid rgba(255,255,255,.1);
}

.stat-item:last-child { border-right: none; padding-right: 0; }

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
}

.stat-label {
    font-size: .78rem;
    color: var(--gray-light);
    margin-top: .2rem;
}

/* =============================================
   SEÇÕES
   ============================================= */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--black);
    letter-spacing: -.02em;
}

.section-subtitle {
    color: var(--gray-mid);
    font-size: .95rem;
    margin-bottom: 2.25rem;
}

.section-title-wrap { margin-bottom: 2.5rem; }

.section-divider {
    width: 40px;
    height: 3px;
    background: var(--cream);
    border-radius: 2px;
    margin-top: .6rem;
}

/* =============================================
   CARDS DE TIPO DE IMÓVEL
   ============================================= */
.tipo-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    font-weight: 600;
    font-size: .875rem;
    color: var(--charcoal);
    text-decoration: none;
    display: block;
}

.tipo-card:hover {
    border-color: var(--charcoal);
    color: var(--black);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(6,14,24,.1);
}

.tipo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--charcoal);
    margin: 0 auto .75rem;
    transition: background .2s;
}

.tipo-card:hover .tipo-icon {
    background: var(--charcoal);
    color: var(--white);
}

/* =============================================
   CTA CORRETOR
   ============================================= */
.cta-corretor {
    background: var(--black);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.cta-corretor::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(245,224,211,.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-corretor h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: .5rem;
    letter-spacing: -.02em;
}

.cta-corretor p {
    color: var(--gray-light);
    font-size: .97rem;
    max-width: 500px;
}

.btn-cta-light {
    background: var(--cream);
    color: var(--black);
    font-weight: 700;
    font-size: .95rem;
    padding: .75rem 1.75rem;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: background .2s, transform .15s;
    font-family: var(--font-body);
}
.btn-cta-light:hover {
    background: var(--white);
    color: var(--black);
    transform: translateY(-2px);
}

/* =============================================
   FOOTER
   — usa logo_white.png (branco, fundo transparente)
   ============================================= */
.site-footer {
    background: var(--black);
    color: var(--gray-light);
    padding: 3.5rem 0 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}

.footer-brand img {
    height: 42px;
    width: auto;
    /* logo_white.png já é branco — não precisa de filter */
}

.site-footer h6 {
    color: var(--white);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.site-footer a {
    color: var(--gray-mid);
    font-size: .875rem;
    text-decoration: none;
    transition: color .15s;
    display: block;
    margin-bottom: .4rem;
}

.site-footer a:hover { color: var(--cream); }

.footer-divider {
    border-color: rgba(255,255,255,.08);
    margin: 2rem 0 1.25rem;
}

.footer-copy {
    color: var(--gray-mid);
    font-size: .8rem;
    text-align: center;
}

/* =============================================
   UTILITÁRIOS
   ============================================= */
.bg-site { background: var(--bg); }

@media (max-width: 991px) {
    .hero-section { min-height: auto; }
    .hero-content { padding: 2rem 0 2rem; }
    .search-card { max-width: 100%; }
    .busca-header .container { overflow-x: hidden; }
    .hero-bg {
        background:
            linear-gradient(to bottom, rgba(6,14,24,.95) 0%, rgba(6,14,24,.75) 60%, rgba(6,14,24,.55) 100%),
            url('/images/hero-bg.jpg') center 30% / cover no-repeat;
    }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
    .stat-item:last-child { border-bottom: none; }
    .navbar-brand img { height: 40px; }

    /* ── Hero mobile: texto acima do search card ── */
    .hero-text-col {
        text-align: center;
        padding-bottom: 1.5rem;
    }
    .hero-text-col .hero-badge {
        margin: 0 auto 1rem;
    }
    .hero-text-col .hero-title {
        font-size: clamp(1.85rem, 8vw, 2.6rem);
        line-height: 1.15;
        margin-bottom: .75rem;
    }
    .hero-text-col .hero-subtitle {
        font-size: .92rem;
        max-width: 320px;
        margin: 0 auto;
        line-height: 1.65;
        color: rgba(245,224,211,.75);
    }
}

@media (max-width: 575px) {
    .hero-content { padding: 1.75rem 0 1.75rem; }
    .hero-text-col .hero-title {
        font-size: clamp(1.65rem, 9vw, 2.1rem);
    }
    .hero-text-col .hero-subtitle {
        font-size: .85rem;
    }
}

/* ===== Documentos Upload Card ===== */
.doc-upload-card {
    border: 2px dashed #cbd5e0;
    border-radius: 14px;
    background: #f7f9fc;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    user-select: none;
}
.doc-upload-card:hover { border-color: #3b82f6; background: #eff6ff; }
.doc-upload-card.has-file { border-color: #38a169; background: #f0fff4; }
.doc-upload-card input[type="file"] { display: none; }

/* ===== Badges de status ===== */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .75rem;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
}
.badge-ativo    { background: #dcfce7; color: #166534; }
.badge-pendente { background: #fef9c3; color: #854d0e; }
.badge-inativo  { background: #f1f5f9; color: #64748b; }
.badge-rejeitado{ background: #fee2e2; color: #991b1b; }

/* ===== Footer links ===== */
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-heading {
    color: var(--white);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}
.footer-bottom p { color: var(--gray-mid); font-size: .8rem; margin: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   DROPDOWN LOCALIZAÇÃO (home hero search-card)
   ══════════════════════════════════════════════════════════════════════════ */
.loc-dropdown      { position: relative; width: 100%; }

.loc-trigger {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--charcoal);
    border-radius: 8px;
    font-size: .9rem;
    font-family: var(--font-body);
    padding: .6rem .9rem;
    height: 44px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; gap: .4rem;
    transition: border-color .2s, box-shadow .2s;
    text-align: left;
}
.loc-trigger:hover,
.loc-dropdown.open .loc-trigger {
    border-color: var(--charcoal);
    box-shadow: 0 0 0 3px rgba(39,39,34,.08);
}
.loc-trigger span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--charcoal); flex: 1;
}
.loc-trigger i {
    flex-shrink: 0; font-size: .65rem;
    color: var(--gray-mid); transition: transform .2s;
}
.loc-dropdown.open .loc-trigger i { transform: rotate(180deg); }

.loc-panel {
    display: none;
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 9999;
    width: 100%; min-width: 200px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.loc-dropdown.open .loc-panel { display: block; }

.loc-search-wrap {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.loc-search-wrap i { color: var(--gray-mid); font-size: .8rem; }
.loc-search {
    background: none; border: none; outline: none;
    color: var(--charcoal); font-size: .85rem; width: 100%;
    font-family: var(--font-body);
}
.loc-search::placeholder { color: var(--gray-mid); }

.loc-list {
    list-style: none; margin: 0; padding: .3rem 0;
    max-height: 200px; overflow-y: auto;
}
.loc-list::-webkit-scrollbar       { width: 4px; }
.loc-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.loc-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: .45rem .85rem; cursor: pointer;
    font-size: .87rem; color: var(--charcoal);
    transition: background .15s;
}
.loc-item:hover    { background: var(--bg); }
.loc-item.active   { font-weight: 600; }
.loc-item i        { color: var(--charcoal); font-size: .72rem; }
.loc-item.oculta   { display: none; }

.btn-filtros-avancados {
    display: flex; align-items: center; gap: .5rem;
    background: none;
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    color: var(--gray-mid);
    font-size: .82rem; font-weight: 600;
    font-family: var(--font-body);
    padding: .45rem .9rem;
    cursor: pointer; width: 100%;
    transition: border-color .2s, color .2s;
}
.btn-filtros-avancados:hover {
    border-color: var(--charcoal);
    color: var(--charcoal);
}
.btn-filtros-avancados .fa-chevron-down {
    margin-left: auto;
    font-size: .65rem;
    transition: transform .25s;
}
.btn-filtros-avancados.aberto .fa-chevron-down {
    transform: rotate(180deg);
}
.btn-search,
.btn-search i,
.btn-search:hover,
.btn-search:hover i {
    color: var(--white) !important;
}