/* =========================================================
   1. VARIÁVEIS E CONFIGURAÇÕES GERAIS (HIGH END)
   ========================================================= */
:root {
    --gold: #C5A059;          
    --gold-hover: #b08d4b;
    --dark: #0a0a0a; /* Preto mais profundo e luxuoso */
    --dark-grey: #1a1a1a;
    --bg-light: #F8F8F8;      
    --text-grey: #666666;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background-color: var(--bg-light); 
    color: var(--dark-grey); 
    font-family: 'Montserrat', sans-serif; 
    overflow-x: hidden; 
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4, h5, .slogan-topo, .slogan-footer, .destaque-bio, .playfair { 
    font-family: 'Playfair Display', serif; 
}

.container { max-width: 1300px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Animações de Scroll */
.anime-scroll { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.anime-scroll.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   2. CABEÇALHO E NAVEGAÇÃO
   ========================================================= */
header[role="banner"] {
    background: var(--dark);
    padding: 15px 0;
    position: sticky;
    top: 0; 
    z-index: 9999; /* Z-index altíssimo para NADA passar por cima */
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }

.logo-area { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.logo-img { height: 60px; width: auto; object-fit: contain; }

.nav-menu { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-menu a { 
    color: #ccc; text-decoration: none; font-size: 0.85rem; 
    text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; font-weight: 500;
}
.nav-menu a:hover, .nav-menu a.ativo { color: var(--gold); } 

.btn-anunciar { 
    border: 1px solid var(--gold); padding: 10px 25px; color: var(--gold) !important; 
    transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; border-radius: 4px;
}
.btn-anunciar:hover { background: var(--gold); color: white !important; }

/* Menu Mobile Toggle */
#menu-toggle { display: none; }
.menu-icon { display: none; font-size: 1.5rem; color: white; cursor: pointer; }

/* =========================================================
   3. PÁGINA INICIAL (INDEX) - HERO E BUSCA
   ========================================================= */
.hero {
    background: url('https://images.unsplash.com/photo-1613490493576-7fde63acd811?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    background-attachment: fixed;
    padding: 160px 0 120px 0;
    text-align: center; color: white; position: relative;
}

.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(10,10,10,0.9), rgba(10,10,10,0.5)); z-index: 1;
}

.hero-content { position: relative; z-index: 2; }

.slogan-topo { color: var(--gold); letter-spacing: 4px; font-size: 0.85rem; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; }
.hero h1 { font-size: 3.5rem; margin-bottom: 15px; font-weight: 400; line-height: 1.2; }
.sub-hero { font-size: 1.1rem; color: #ddd; margin-bottom: 50px; font-weight: 300; }

/* Busca Avançada Topo */
.busca-avancada { background: white; padding: 8px; border-radius: 50px; box-shadow: 0 15px 40px rgba(0,0,0,0.15); display: flex; gap: 5px; max-width: 800px; margin: 0 auto; align-items: center; position: relative; z-index: 10; }
.busca-input-box { flex: 1; display: flex; align-items: center; padding: 0 25px; height: 55px; border-radius: 50px; background: transparent; }
.busca-input-box i { color: var(--gold); margin-right: 15px; font-size: 1.2rem;}
.busca-input-box input { border: none; width: 100%; outline: none; background: transparent; font-family: 'Montserrat', sans-serif; font-size: 1.05rem; color: #333; }
.busca-btn { height: 55px; padding: 0 40px; background: var(--gold); color: white; border: none; border-radius: 50px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: 0.3s; }
.busca-btn:hover { background: var(--dark); }

/* =========================================================
   4. LAYOUT PRINCIPAL, LISTA E ORDENAÇÃO
   ========================================================= */
.main-layout { display: flex; gap: 50px; padding: 60px 20px; align-items: flex-start; }
.imoveis-secao { flex: 2; width: 100%; }
.mapa-secao { flex: 1; height: auto; position: relative; z-index: 1; }

#grid-imoveis-container { transition: opacity 0.3s ease; }
.loading-active { opacity: 0.4; pointer-events: none; }

.header-acoes { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; border-bottom: 1px solid #e0e0e0; padding-bottom: 15px; flex-wrap: wrap; gap: 20px;}
.header-acoes h2 { font-size: 2.2rem; color: var(--dark); margin-bottom: 2px; }

.filtros-rapidos { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.filtros-rapidos a { font-size: 0.85rem; color: #999; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; text-decoration: none; transition: 0.3s; cursor: pointer; }
.filtros-rapidos a:hover, .filtros-rapidos a.ativo { color: var(--gold); }

.ferramentas-lista { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.ordenacao select { padding: 8px 15px; border: 1px solid #eaeaea; border-radius: 6px; outline: none; font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 600; color: #555; background: #fafafa; cursor: pointer; text-transform: uppercase; appearance: none; background-image: url('data:image/svg+xml;utf8,<svg fill="%23555" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); background-repeat: no-repeat; background-position: right 10px center; padding-right: 35px; transition: 0.3s;}
.ordenacao select:hover { border-color: var(--gold); }

.btn-filtros-pro { background: transparent; border: 1px solid var(--dark-grey); color: var(--dark-grey); padding: 8px 20px; border-radius: 6px; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.btn-filtros-pro:hover { background: var(--dark-grey); color: white; }

/* =========================================================
   5. CARDS DOS IMÓVEIS (GRID) E PAGINAÇÃO
   ========================================================= */
.grid-imoveis { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.card-equity { background: white; border: 1px solid #eee; border-radius: 4px; transition: 0.5s ease; position: relative; overflow: hidden; display: flex; flex-direction: column;}
.card-equity:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); border-color: transparent; }

.thumb { height: 250px; background-size: cover; background-position: center; position: relative; transition: 0.5s; border-radius: 4px 4px 0 0;}
.card-equity:hover .thumb { transform: scale(1.03); }
.tag { position: absolute; top: 15px; left: 15px; background: rgba(10,10,10,0.9); color: var(--gold); padding: 6px 12px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; z-index: 2; border-radius: 2px;}

.content { padding: 25px; position: relative; background: white; z-index: 2; flex: 1; display: flex; flex-direction: column; }
.tipo-imovel { color: var(--gold); font-size: 0.75rem; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.content h3 { font-size: 1.3rem; margin: 8px 0; color: var(--dark-grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.local { color: #888; font-size: 0.9rem; margin-bottom: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.infos-internas { display: flex; justify-content: space-between; color: #555; font-size: 0.85rem; margin-bottom: 20px; }
.infos-internas i { color: #ccc; margin-right: 5px; }

.divisor { height: 1px; background: #eee; margin-top: auto; margin-bottom: 15px; }
.footer-card { display: flex; justify-content: space-between; align-items: center; }
.preco { font-size: 1.2rem; font-weight: 600; color: var(--dark); }

a.btn-ver { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #ddd; background: white; cursor: pointer; transition: 0.3s; color: var(--dark); display: flex; align-items: center; justify-content: center; text-decoration: none !important; box-shadow: none !important; }
.card-equity:hover a.btn-ver { background: var(--dark-grey); border-color: var(--dark-grey); color: white; }

.paginacao { display: flex; justify-content: center; gap: 8px; margin-top: 50px; }
.pag-btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid #eaeaea; background: white; color: var(--dark-grey); border-radius: 4px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.pag-btn:hover, .pag-btn.ativo { background: var(--gold); color: white; border-color: var(--gold); }

/* =========================================================
   6. MAPA LEAFLET PREMIUM
   ========================================================= */
.sticky-wrapper { position: sticky; top: 100px; }
.sticky-wrapper h3 { font-size: 1.3rem; color: var(--dark); margin-bottom: 5px;}
#mapa-premium { height: 450px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: 1px solid #eee; z-index: 1; }

.leaflet-popup-content-wrapper { border-radius: 8px; padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 200px !important; }
.map-popup-card { font-family: 'Montserrat', sans-serif; }
.map-popup-img { width: 100%; height: 100px; object-fit: cover; }
.map-popup-info { padding: 10px; }
.map-popup-info h5 { margin: 0; color: var(--dark-grey); font-size: 0.9rem; font-weight: 700;}
.map-popup-info p { margin: 5px 0; color: var(--gold); font-weight: bold; font-size: 0.8rem; }
.map-popup-link { display: block; background: var(--dark) !important; color: #ffffff !important; text-align: center; text-decoration: none !important; font-size: 0.7rem; padding: 10px; text-transform: uppercase; font-weight: bold; transition: 0.3s; border: none;}
.map-popup-link:hover { background: var(--gold) !important; color: #ffffff !important;}

/* =========================================================
   7. MODAL DE FILTROS AVANÇADOS
   ========================================================= */
.modal-filtros-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 9999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.3s ease; }
.modal-filtros-overlay.show { display: flex; opacity: 1; }
.modal-filtros-box { background: white; width: 100%; max-width: 600px; border-radius: 12px; padding: 40px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); transform: translateY(20px); transition: transform 0.3s ease; }
.modal-filtros-overlay.show .modal-filtros-box { transform: translateY(0); }
.close-modal { position: absolute; top: 20px; right: 25px; font-size: 1.5rem; color: #999; cursor: pointer; transition: 0.3s; }
.close-modal:hover { color: var(--dark-grey); }
.modal-filtros-box h3 { font-size: 2rem; color: var(--dark-grey); margin-bottom: 30px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px;}
.grid-filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.filter-group label { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: #777; margin-bottom: 8px; }
.filter-group select, .filter-group input { width: 100%; padding: 15px; border: 1px solid #eaeaea; border-radius: 6px; font-family: 'Montserrat', sans-serif; outline: none; background: #fafafa; font-size: 0.95rem; color: #333; box-sizing: border-box; }
.filter-group select:focus, .filter-group input:focus { border-color: var(--gold); }
.btn-aplicar-filtros { width: 100%; padding: 18px; background: var(--dark-grey); color: var(--gold); border: none; border-radius: 6px; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; transition: 0.3s; font-family: 'Montserrat', sans-serif; font-size: 1rem; }
.btn-aplicar-filtros:hover { background: var(--gold); color: white; }

/* =========================================================
   8. PÁGINA SOBRE (ABOUT US)
   ========================================================= */

.hero-sobre {
    position: relative;
    background: linear-gradient(to bottom, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.9) 100%), 
                url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    background-attachment: fixed;
    padding: 220px 20px 160px;
    text-align: center;
    color: white;
    border-bottom: 3px solid var(--gold);
    overflow: hidden;
}
.hero-sobre h1 { font-size: 4rem; margin: 0; color: #fff; font-weight: 400; line-height: 1.2; }

.bio-section { padding: 100px 20px; background: #fff; overflow: hidden; }
.bio-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 80px; max-width: 1100px; margin: 0 auto; align-items: center; }

.bio-image-container { position: relative; z-index: 1; margin: 25px 0 0 25px; }

.foto-victor { 
    width: 100%; 
    height: auto;
    aspect-ratio: 4 / 5; 
    object-fit: cover; 
    object-position: top center; 
    border-radius: 4px; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.15); 
    position: relative; 
    z-index: 2; 
    transition: transform 0.5s ease;
}

.bio-image-container::after { 
    content: ''; 
    position: absolute; 
    top: -25px; 
    left: -25px; 
    width: 100%; 
    height: 100%; 
    border: 2px solid var(--gold); 
    border-radius: 4px; 
    z-index: -1; 
    transition: all 0.5s ease;
}

.bio-image-container:hover .foto-victor {
    transform: translate(-5px, -5px);
}
.bio-image-container:hover::after {
    top: -15px;
    left: -15px;
    border-color: var(--gold-hover);
}

.bio-text h2 { font-family: 'Montserrat', sans-serif; font-size: 0.85rem; color: #999; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 10px; }
.bio-text h3 { font-size: 3rem; color: var(--dark-grey); margin-bottom: 30px; margin-top: 0; }
.destaque-bio { font-size: 1.3rem; color: var(--gold); font-style: italic; border-left: 3px solid var(--gold); padding-left: 20px; margin-bottom: 35px; line-height: 1.6; }
.texto-corrido p { font-size: 1rem; color: #666; line-height: 1.9; margin-bottom: 20px; text-align: justify; }
.texto-corrido strong { color: var(--dark-grey); font-weight: 600; }

.btn-assinatura { display: inline-flex; align-items: center; gap: 15px; margin-top: 20px; padding: 18px 40px; background: var(--dark-grey); color: var(--gold); text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; border-radius: 4px; transition: 0.4s; font-size: 0.85rem; }
.btn-assinatura:hover { background: var(--gold); color: #fff; transform: translateY(-3px); box-shadow: 0 15px 30px rgba(197, 160, 89, 0.2); }

.pilares-section { background: #fafafa; padding: 100px 20px; border-top: 1px solid #f0f0f0; }
.pilares-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; max-width: 1100px; margin: 0 auto; }
.pilar-card { background: white; padding: 50px 40px; border-radius: 6px; text-align: center; box-shadow: 0 15px 40px rgba(0,0,0,0.03); border: 1px solid #eee; transition: 0.4s; }
.pilar-card:hover { transform: translateY(-10px); border-color: var(--gold); box-shadow: 0 20px 50px rgba(197, 160, 89, 0.1); }
.pilar-card i { font-size: 2.5rem; color: var(--gold); margin-bottom: 25px; }
.pilar-card h4 { font-size: 1.6rem; color: var(--dark-grey); margin-bottom: 15px; margin-top: 0; }
.pilar-card p { font-size: 0.95rem; color: #777; line-height: 1.7; margin: 0; }

/* =========================================================
   9. FOOTER E BOTÃO WHATSAPP
   ========================================================= */
footer { background-color: var(--dark); color: #fff; padding: 70px 0 20px 0; border-top: 1px solid rgba(197, 160, 89, 0.15); margin-top: auto;}
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 50px; }

.footer-col h4 { color: var(--gold); font-size: 1.3rem; margin-bottom: 25px; font-weight: 400; letter-spacing: 1px; border-bottom: 1px solid rgba(197, 160, 89, 0.2); padding-bottom: 10px; display: inline-block; }
.footer-col p { color: #999; font-size: 0.9rem; line-height: 1.8; margin-bottom: 15px; }

.footer-link { color: #999; font-size: 0.9rem; text-decoration: none; transition: color 0.3s ease; display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.footer-link:hover { color: var(--gold); }
.footer-link i { font-size: 1.1rem; color: var(--gold); width: 20px; text-align: center; }

.footer-logo-area img { max-height: 95px; margin-bottom: 20px; object-fit: contain; }
.slogan-footer { font-style: italic; color: #888; font-size: 1.1rem; margin-bottom: 20px !important; }
.creci-footer { display: inline-block; padding: 6px 15px; border: 1px solid rgba(197, 160, 89, 0.4); border-radius: 4px; color: var(--gold); font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; }

.btn-insta-footer { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 1px solid #333; border-radius: 4px; color: #fff; text-decoration: none; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; margin-top: 10px; }
.btn-insta-footer i { font-size: 1.2rem; color: var(--gold); }
.btn-insta-footer:hover { border-color: var(--gold); background: rgba(197, 160, 89, 0.05); }

.footer-bottom { text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.footer-bottom p { margin: 0; color: #777; font-size: 0.85rem; }
.footer-bottom a.dev-link { color: var(--gold); font-weight: 600; text-decoration: none; transition: 0.3s; }
.footer-bottom a.dev-link:hover { color: #fff; }
.admin-lock { color: #1a1a1a; margin-left: 10px; text-decoration: none; font-size: 0.8rem; transition: 0.3s; }
.admin-lock:hover { color: var(--gold); }

/* WhatsApp Flutuante */
.btn-whatsapp-flutuante {
    position: fixed; bottom: 30px; right: 30px; background-color: #25d366; color: white;
    width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 32px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 2000; transition: all 0.3s ease; text-decoration: none;
}
.btn-whatsapp-flutuante::after {
    content: ''; 
    position: absolute; 
    top: -2px; left: -2px; right: -2px; bottom: -2px; /* Compensa perfeitamente a linha */
    background-color: transparent; 
    border: 2px solid #25d366; 
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: -1; /* Garante que a onda saia de trás do botão */
}
.btn-whatsapp-flutuante:hover { transform: scale(1.1); background-color: #20bd5a; }

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* =========================================================
   10. MARKET INTELLIGENCE CARD (BARRA LATERAL)
   ========================================================= */
.market-intelligence-card { 
    background: var(--dark); 
    border-radius: 8px; 
    padding: 30px; 
    color: white; 
    margin-top: 30px; 
    border: 1px solid rgba(197, 160, 89, 0.3); 
    position: relative; 
    overflow: hidden; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.market-intelligence-card::before { 
    content: ''; 
    position: absolute; 
    top: -50%; 
    left: -50%; 
    width: 200%; 
    height: 200%; 
    background: radial-gradient(circle, rgba(197, 160, 89, 0.05) 0%, transparent 70%); 
    pointer-events: none; 
}

.market-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 25px; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    padding-bottom: 15px; 
}

.market-header h4 { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.4rem; 
    color: var(--gold); 
    margin: 0; 
}

.market-badge { 
    background: rgba(197, 160, 89, 0.1); 
    color: var(--gold); 
    font-size: 0.65rem; 
    padding: 4px 10px; 
    border-radius: 20px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-weight: 700; 
    border: 1px solid var(--gold); 
}

.market-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 15px; 
    padding-bottom: 10px; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

.market-region { 
    font-size: 0.85rem; 
    font-weight: 500; 
    color: #ddd; 
}

.market-data { 
    text-align: right; 
}

.market-price { 
    display: block; 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: white; 
}

.market-up { 
    font-size: 0.75rem; 
    color: #25D366; 
    font-weight: 600; 
}

.market-up i { 
    font-size: 0.6rem; 
    margin-right: 3px; 
}

.btn-report { 
    width: 100%; 
    padding: 15px; 
    background: transparent; 
    border: 1px solid var(--gold); 
    color: var(--gold); 
    border-radius: 4px; 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    cursor: pointer; 
    transition: 0.3s; 
    margin-top: 10px; 
    font-size: 0.8rem; 
}

.btn-report:hover { 
    background: var(--gold); 
    color: white; 
}

/* =========================================================
   11. PAINEL ADMINISTRATIVO (PROTEGIDO)
   ========================================================= */

/* Estilo para a tela de LOGIN do Admin */
.admin-login-body {
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}
.login-box {
    background: #1a1a1a;
    padding: 50px 40px;
    border-radius: 12px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    text-align: center;
    width: 100%; max-width: 420px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}
.login-box img { height: 85px; margin-bottom: 35px; object-fit: contain; }
.login-box h2 { color: white; font-family: 'Playfair Display', serif; margin-bottom: 30px; font-weight: 400; font-size: 1.8rem; letter-spacing: 1px; }
.login-box input {
    width: 100%; padding: 16px; margin-bottom: 25px; background: #111; border: 1px solid #333; color: white; border-radius: 6px; text-align: center; font-size: 1.1rem; font-family: 'Montserrat', sans-serif; outline: none; transition: all 0.3s ease; box-sizing: border-box;
}
.login-box input:focus { border-color: var(--gold); box-shadow: 0 0 15px rgba(197, 160, 89, 0.2); }
.login-box button { width: 100%; padding: 16px; background: var(--gold); border: none; color: white; font-family: 'Montserrat', sans-serif; font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: 2px; transition: 0.3s; border-radius: 6px; }
.login-box button:hover { background: #b08d4b; transform: translateY(-2px); }
.back-link { color: #666; text-decoration: none; display: block; margin-top: 25px; font-size: 0.85rem; transition: 0.3s; }

.error-msg { color: #ff4d4d; font-size: 0.8rem; margin-bottom: 15px; }

/* Estrutura do Painel Interno */
.admin-panel { background: #f8f8f8; padding-top: 0; }
.admin-header { background: var(--dark); padding: 15px 0; border-bottom: 2px solid rgba(255,255,255,0.1); color: white; margin-bottom: 40px; }
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.admin-header img { height: 60px; object-fit: contain; }
.admin-header h3 { letter-spacing: 2px; font-size: 1.2rem; color: var(--gold); margin: 0; text-transform: uppercase; }
.btn-logout { color: #ff4d4d; font-size: 0.9rem; text-decoration: none; font-weight: 600; text-transform: uppercase; transition: 0.3s; }
.btn-logout:hover { color: #cc0000; }

.admin-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; }

.panel-white { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid #f0f0f0; margin-bottom: 30px; }
.panel-white h2 { margin-bottom: 30px; color: var(--dark); font-size: 1.8rem; }

/* Formulários do Admin */
.form-group { margin-bottom: 25px; display: flex; flex-direction: column; justify-content: flex-end; }
.form-group label { display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: #999; margin-bottom: 8px; letter-spacing: 1px; }
.form-group input[type="text"], .form-group input[type="number"], .form-group select { 
    width: 100%; height: 50px; padding: 0 15px; border: 1px solid #eee; border-radius: 4px; font-size: 0.95rem; outline: none; background: #fafafa; box-sizing: border-box; transition: 0.3s; color: #333; 
}
.form-group input[type="file"] { padding: 12px 15px; border: 1px solid #eee; border-radius: 4px; background: #fafafa; font-size: 0.9rem; color: #666; width: 100%; box-sizing: border-box;}
.form-group textarea { width: 100%; padding: 15px; border: 1px solid #eee; border-radius: 4px; font-size: 0.95rem; outline: none; background: #fafafa; box-sizing: border-box; transition: 0.3s; color: #333; resize: vertical; }

.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--gold); background: #fff; }

.row, .row-tri, .row-quad { display: grid; gap: 20px; }
.row { grid-template-columns: 1fr 1fr; }
.row-tri { grid-template-columns: 1fr 1fr 1fr; }
.row-quad { grid-template-columns: 1fr 1fr 1.2fr 1.2fr; gap: 15px; }

.btn-group { display: flex; gap: 15px; margin-top: 20px; }
.btn-save { background: var(--dark); color: var(--gold); border: 1px solid var(--dark); padding: 18px; width: 100%; cursor: pointer; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; transition: 0.3s; border-radius: 4px; font-size: 0.9rem; }
.btn-save:hover { background: transparent; color: var(--dark); }
.btn-clear { background: transparent; color: #888; border: 1px solid #ddd; padding: 18px; width: 100%; cursor: pointer; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; border-radius: 4px; font-size: 0.9rem;}
.btn-clear:hover { background: #eee; color: var(--dark); }

/* Listagem de Imóveis no Admin */
.list-item { display: flex; align-items: center; gap: 20px; padding: 15px 0; border-bottom: 1px solid #f0f0f0; transition: all 0.3s ease; }
.list-item:last-child { border-bottom: none; }
.list-item:hover { transform: translateX(5px); }
.list-item img { width: 80px; height: 55px; border-radius: 4px; object-fit: cover; }
.item-info { flex: 1; }
.item-info h4 { margin: 0 0 5px 0; font-size: 1.1rem; color: var(--dark); font-weight: 600; display: flex; align-items: center;}
.item-info span { font-size: 0.85rem; color: #999; }
.item-actions { display: flex; gap: 5px; }
.item-actions a, .item-actions button { background: transparent; border: none; color: #ccc; font-size: 1.1rem; cursor: pointer; transition: 0.3s; padding: 10px; border-radius: 4px; text-decoration: none; display: flex; align-items: center; justify-content: center;}
.item-actions a:hover, .item-actions button:hover { background: #f9f9f9; color: var(--gold); }
.item-actions .danger:hover { color: #ff4d4d; background: #fff0f0; }
.list-item.oculto { opacity: 0.6; filter: grayscale(100%); }

/* Preview Lateral */
.admin-aside { max-height: 100vh; overflow-y: auto; padding-right: 15px; position: sticky; top: 20px; }
.label { color: #999; font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin: 0; margin-bottom: 20px; }

/* =========================================================
   12. RESPONSIVIDADE (MOBILE & TABLETS)
   ========================================================= */
@media (max-width: 992px) {
    /* CORREÇÃO CRÍTICA SAFARI IOS: Desativar background-attachment fixed para evitar bugs de zoom na rolagem */
    .hero, .hero-sobre { background-attachment: scroll !important; }
    
    /* Main Layout */
    .main-layout { flex-direction: column; }
    .mapa-secao { width: 100%; margin-top: 40px; }
    #mapa-premium { height: 400px; }
    
    /* Sobre */
    .bio-grid { grid-template-columns: 1fr; gap: 50px; }
    .bio-image-container { margin: 0; } 
    .bio-image-container::after { display: none; }
    
    /* Admin */
    .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Menu Mobile */
    .nav-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--dark); flex-direction: column; padding: 20px; text-align: center; border-top: 1px solid #222; }
    .menu-icon { display: block; }
    #menu-toggle:checked ~ .nav-menu { display: flex; }
    
    /* Headers & Hero */
    .hero h1 { font-size: 2.5rem; }
    .hero-sobre h1 { font-size: 2.8rem; }
    
    /* Busca */
    .busca-avancada { flex-direction: column; border-radius: 12px; padding: 15px; background: rgba(255, 255, 255, 0.95); }
    .busca-input-box { background: #f5f5f5; border-radius: 8px; height: 50px; margin-bottom: 10px; width: 100%; box-sizing: border-box; }
    .busca-btn { border-radius: 8px; width: 100%; height: 50px; }

    /* Filtros e Layout Home */
    .header-acoes { flex-direction: column; align-items: flex-start; gap: 20px; }
    .ferramentas-lista { width: 100%; justify-content: space-between; }
    .filtros-rapidos { width: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 10px; }
    
    .modal-filtros-box { padding: 25px; width: 90%; }
    .grid-filtros { grid-template-columns: 1fr; }
    
    /* Sobre Bio */
    .bio-text h3 { font-size: 2.5rem; }
    .btn-assinatura { width: 100%; justify-content: center; box-sizing: border-box; }
    
    /* Componentes Menores */
    .btn-whatsapp-flutuante { width: 50px; height: 50px; font-size: 26px; bottom: 20px; right: 20px; }
    
    /* Admin */
    .row, .row-tri, .row-quad { grid-template-columns: 1fr; }
}

/* =========================================================
   13. MAPA MODAL (CORTINA PERFEITA - ZERO LAG)
   ========================================================= */

.map-wrap-dinamico {
    position: relative;
    width: 100%;
    /* ATENÇÃO: Sem "transition" aqui. O JS vai adicionar e remover a transição na hora certa! */
}

/* Fundo Preto Cinemático */
.mapa-backdrop {
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); 
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Modal estático - Sem animação de tamanho para não bugar o Leaflet */
.map-wrap-dinamico.modo-modal {
    position: fixed !important;
    top: 7.5vh !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 95vw !important;
    max-width: 1300px !important;
    height: 85vh !important;
    z-index: 99999 !important;
    background: transparent !important;
}

.map-wrap-dinamico.modo-modal #mapa-premium {
    height: 100% !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    border: 2px solid var(--gold) !important;
}

/* Trava a rolagem do site quando o mapa está aberto */
body.mapa-aberto { overflow: hidden; }

/* Liberta o mapa da hierarquia do site para ele poder ficar em tela cheia */
body.mapa-aberto .mapa-secao,
body.mapa-aberto .sticky-wrapper {
    transform: none !important;
    position: static !important;
    z-index: 99999;
}

/* Botão Ampliar Mapa (Lateral) */
.btn-mapa-action {
    background: var(--dark); 
    color: var(--gold); 
    border: 1px solid var(--gold);
    padding: 8px 15px; 
    border-radius: 4px; 
    font-size: 0.8rem; 
    font-weight: 700;
    text-transform: uppercase; 
    cursor: pointer; 
    transition: 0.3s;
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-family: 'Montserrat', sans-serif;
}
.btn-mapa-action:hover { background: var(--gold); color: white; }

/* Botão Fechar (O "X" dentro do mapa gigante) */
#btn-fechar-mapa {
    display: none; 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    z-index: 1000000;
    background: var(--dark); 
    color: var(--white); 
    border: 2px solid var(--gold); 
    width: 50px; 
    height: 50px; 
    border-radius: 50%;
    font-size: 1.5rem; 
    cursor: pointer; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.6);
    transition: 0.2s;
}
.map-wrap-dinamico.modo-modal #btn-fechar-mapa { display: flex; }
#btn-fechar-mapa:hover { background: var(--gold); color: var(--dark); }

/* Ajuste dos botões nativos do mapa (Zoom/Layers) para não ficarem em cima do "X" */
.map-wrap-dinamico.modo-modal .leaflet-top.leaflet-right {
    margin-top: 75px !important;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    #btn-fechar-mapa { top: 10px; right: 10px; width: 40px; height: 40px; font-size: 1.2rem; }
    .map-wrap-dinamico.modo-modal .leaflet-top.leaflet-right { margin-top: 60px !important; }
    .map-wrap-dinamico.modo-modal { width: 95vw !important; height: 75vh !important; top: 10vh !important; }
}

/* =========================================================
   14. FIXES DO LEAFLET E RADIO BUTTONS
   ========================================================= */

/* HACK: Fundo escuro e sombra de preenchimento para as linhas entre os tiles */
.leaflet-container { 
    background-color: #222 !important; 
}
.leaflet-tile {
    box-shadow: 0 0 1px rgba(0,0,0,0.3) !important; 
}
.leaflet-tile-container img {
    outline: none !important; 
    border: none !important;
}

/* Radio Button Nativo Verde / Dourado */
.leaflet-control-layers-selector {
    accent-color: #0c5232 !important;
    cursor: pointer !important;
    width: 16px; height: 16px;
    vertical-align: middle;
    transition: 0.3s ease;
}
.leaflet-control-layers-label:hover .leaflet-control-layers-selector,
.leaflet-control-layers-selector:hover {
    accent-color: #C5A059 !important;
}

/* Fundo escuro para disfarçar carregamento */
.leaflet-container { 
    background-color: #222 !important; 
}
.leaflet-tile {
    box-shadow: 0 0 1px rgba(0,0,0,0.3) !important; 
}
.leaflet-tile-container img {
    outline: none !important; 
    border: none !important;
}

/* ADEUS MÃOZINHA PIXELADA DO WINDOWS */
.leaflet-grab { cursor: default !important; } /* Seta padrão lisa ao invés da mão feia */
.leaflet-interactive { cursor: pointer !important; } /* Mãozinha clássica (dedo) para clicar nos pinos */
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-container { 
    cursor: move !important; /* Setas direcionais suaves ao arrastar o mapa */
}

/* Radio Button Nativo Verde / Dourado */
.leaflet-control-layers-selector {
    accent-color: #0c5232 !important;
    cursor: pointer !important;
    width: 16px; height: 16px;
    vertical-align: middle;
    transition: 0.3s ease;
}
.leaflet-control-layers-label:hover .leaflet-control-layers-selector,
.leaflet-control-layers-selector:hover {
    accent-color: #C5A059 !important;
}

/* =========================================================
   15. MODAL DA GALERIA DE FOTOS (ADMIN)
   ========================================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.95); z-index: 100000;
    display: none; /* Isso é o que esconde aquela linha branca! */
    align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content { position: relative; max-width: 90%; max-height: 90%; }
.modal-content img { max-width: 100%; max-height: 85vh; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); border: 1px solid rgba(197, 160, 89, 0.3); }

.modal-close { position: absolute; top: -40px; right: 0; color: #fff; font-size: 2rem; cursor: pointer; transition: 0.3s; }
.modal-close:hover { color: var(--gold); }

.modal-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: white; border: 1px solid rgba(255,255,255,0.1); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; transition: 0.3s; }
.modal-nav:hover { background: var(--gold); border-color: var(--gold); }

.modal-prev { left: -70px; }
.modal-next { right: -70px; }

@media (max-width: 768px) {
    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
}
/* ABAS DO PAINEL ADMIN */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 25px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.tab-btn { 
    background: none; border: none; padding: 10px 20px; cursor: pointer; 
    font-family: 'Montserrat', sans-serif; font-weight: 600; color: #999; 
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s;
    border-radius: 4px;
}
.tab-btn:hover { color: var(--dark); background: #f0f0f0; }
.tab-btn.active { color: var(--gold); background: rgba(197, 160, 89, 0.1); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
/* =========================================================
   16. VÍDEO MODAL E BOTÃO (IMOVEL)
   ========================================================= */
.btn-video {
    display: inline-flex; align-items: center; gap: 12px;
    background: transparent; color: var(--gold); border: 2px solid var(--gold);
    padding: 12px 25px; border-radius: 4px; font-family: 'Montserrat', sans-serif;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; transition: 0.4s; font-size: 0.85rem;
}
.btn-video:hover {
    background: var(--gold); color: white;
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.3); transform: translateY(-3px);
}
.modal-video-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.98); z-index: 100000;
    display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-video-overlay.show { display: flex; opacity: 1; }
.modal-video-content {
    position: relative; width: 90%; max-width: 1000px; aspect-ratio: 16/9;
    background: #000; border-radius: 8px; box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    border: 1px solid rgba(197, 160, 89, 0.2); transform: scale(0.9); transition: transform 0.4s ease;
}
.modal-video-overlay.show .modal-video-content { transform: scale(1); }
.modal-video-content iframe { width: 100%; height: 100%; border-radius: 8px; }
.close-video {
    position: absolute; top: -50px; right: 0; color: #fff; font-size: 2rem;
    cursor: pointer; transition: 0.3s; background: transparent; border: none;
}
.close-video:hover { color: var(--gold); transform: scale(1.1); }

/* =========================================================
   17 UX ADMIN: PLACEHOLDERS CLAROS E VALIDAÇÃO LEVE 
   ========================================================= */
::placeholder { color: #d1d1d1 !important; font-style: italic; opacity: 1; }
:-ms-input-placeholder { color: #d1d1d1 !important; font-style: italic; }
::-ms-input-placeholder { color: #d1d1d1 !important; font-style: italic; }

/* Borda levemente vermelha se o campo obrigatório estiver vazio */
input:required:invalid, select:required:invalid, textarea:required:invalid {
    border: 1px solid rgba(255, 69, 58, 0.4) !important;
    background-color: rgba(255, 69, 58, 0.02);
}
/* Borda normal se o campo estiver preenchido */
input:required:valid, select:required:valid, textarea:required:valid {
    border: 1px solid #eee !important;
    background-color: #fafafa;
}
/* Foco nos válidos */
input:required:valid:focus, select:required:valid:focus, textarea:required:valid:focus {
    border-color: var(--gold) !important;
    background-color: #fff;
}
/* =========================================================
   18. FIXES MOBILE (Correções de Responsividade Sênior)
   ========================================================= */

/* Previne a tela de sambar para os lados */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    /* FIX 1: Tipografia e Alinhamento do LogoTexto (Hero) */
    .hero-content img[src*="logotexto"] { max-width: 90% !important; height: auto !important; margin: 0 auto 15px auto !important; display: block; }
    .hero h1, .hero-sobre h1 { font-size: clamp(2rem, 8vw, 2.5rem) !important; width: 100%; }
    .container { padding: 0 25px !important; }

    /* FIX 2: Simetria dos Cards Market Intelligence */
    .mi-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
    .mi-card { height: auto !important; min-height: 220px; padding: 20px 15px !important; display: flex; flex-direction: column; justify-content: flex-end; }
    .mi-card h4 { font-size: 1.1rem !important; line-height: 1.2; margin-top: 5px; }
    .mi-card p { display: none; }

    /* FIX 3: Panorama Grid e Números Blindados (Linha Única) */
    .panorama-main-grid { 
        grid-template-columns: 1fr !important; 
        padding: 30px 15px !important; 
        gap: 35px !important; 
        margin-left: -15px !important; 
        margin-right: -15px !important; 
        border-radius: 8px !important; 
    }
    .panorama-text-box p { text-align: left !important; }
    .panorama-stats-grid { gap: 8px !important; align-items: stretch !important; }
    .panorama-stats-grid .stat-box { padding: 15px 5px !important; text-align: center !important; display: flex !important; flex-direction: column !important; justify-content: center !important; overflow: hidden !important; }
    .panorama-stats-grid .stat-box span { font-size: 0.65rem !important; display: block; line-height: 1.2; margin-bottom: 2px !important; }
    
    /* Sistema Inteligente: Bloco único e redução agressiva automática */
    .panorama-stats-grid .stat-value { 
        display: block !important; /* Força o R$ e o número a serem uma coisa só */
        width: 100% !important; /* Ocupa a caixa toda */
        font-size: clamp(0.7rem, 3.8vw, 1.1rem) !important; /* Mínimo menor para garantir que encolhe! */
        white-space: nowrap !important; /* Proíbe qualquer quebra */
        letter-spacing: -0.5px !important; 
        margin-top: 0 !important; 
    }

    /* FIX 4: Altura do Slider de Imóveis */
    .slider-container-imovel { height: 280px !important; }

    /* FIX 5: Rodapé 100% Centralizado */
    .footer-content { text-align: center; }
    .footer-col { text-align: center; display: flex; flex-direction: column; align-items: center; }
    .footer-col div { align-items: center !important; }
    .footer-link, .btn-insta-footer { justify-content: center !important; }
    .footer-col img { margin: 0 auto 20px auto !important; }
    .footer-col p { margin: 0 auto !important; text-align: center !important; }
    .footer-col h4 { text-align: center !important; width: 100%; }

    /* FIX 6: Mapa Modal Tela Cheia (Admin/Home) */
    .map-wrap-dinamico.modo-modal { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; padding: 0 !important; margin: 0 !important; z-index: 999999 !important; background: #000; border: none !important; }
    .map-wrap-dinamico.modo-modal #mapa-premium { height: 100vh !important; border-radius: 0 !important; }

    /* FIX 7: Botão X do Modal de Imóvel sempre visível e flutuante */
    #modal-foto-imovel .close-video, #modal-video .close-video {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        background: rgba(0,0,0,0.6) !important;
        border: 1px solid rgba(255,255,255,0.2) !important;
        width: 45px; height: 45px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        z-index: 1000001 !important;
    }

    /* FIX 8: Remove a trava de clique do mapa no Mobile (Página Capital) */
    #mapa-overlay-click { display: none !important; }

    /* Ajuste CRECI no Header */
.logo-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.creci-header {
    font-size: 9px;
    color: var(--gold);
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 2px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Ajuste para mobile */
@media (max-width: 768px) {
    .logo-area {
        align-items: center;
    }
}
}