/* ==========================================
   STYLE.CSS - NOVO LAYOUT COM OVERLAP
   ========================================== */

/* ==========================================
   HERO - CAPA FIXA + OVERLAP DE 20%
   ========================================== */

/* Container do hero */
.hero-banner {
    position: relative;
    overflow: visible;
    background: white;
}

/* Capa de fundo - altura fixa */
.hero-banner-content {
    height: 200px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-banner-content {
        height: 360px;
    }
}

/* Imagem de capa FIXA do CDN */
.hero-cover-bg,
#heroCoverBg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Seção do perfil com overlap de 20% */
.profile-section {
    position: relative;
    z-index: 10;
    margin-top: -80px; /* Mobile: 20% de ~160px = ~32px, mas usando mais para melhor visual */
}

@media (min-width: 768px) {
    .profile-section {
        margin-top: -100px; /* Desktop: overlap maior para foto maior */
    }
}

/* Foto do perfil com borda usando corPrimaria */
.profile-avatar {
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    z-index: 11;
}

/* ==========================================
   GRID INTELIGENTE DE IMÓVEIS (1-6)
   ========================================== */

.imoveis-grid {
    display: grid;
    gap: 2rem;
}

/* 1 imóvel: centralizado */
.imoveis-grid[data-count="1"] {
    grid-template-columns: 1fr;
    max-width: 28rem;
    margin: 0 auto;
}

/* 2 imóveis: centralizados */
.imoveis-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 60rem;
    margin: 0 auto;
}

/* 3+ imóveis: grid de 3 colunas */
.imoveis-grid[data-count="3"],
.imoveis-grid[data-count="4"],
.imoveis-grid[data-count="5"],
.imoveis-grid[data-count="6"] {
    grid-template-columns: repeat(3, 1fr);
}

/* Mobile: sempre 1 coluna */
@media (max-width: 768px) {
    .imoveis-grid,
    .imoveis-grid[data-count="1"],
    .imoveis-grid[data-count="2"],
    .imoveis-grid[data-count="3"],
    .imoveis-grid[data-count="4"],
    .imoveis-grid[data-count="5"],
    .imoveis-grid[data-count="6"] {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
}

/* ==========================================
   CARDS DE IMÓVEIS
   ========================================== */

.property-card,
.card-modern {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover,
.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ==========================================
   WHATSAPP FLUTUANTE
   ========================================== */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    font-size: 32px;
    color: white;
}

/* ==========================================
   ANIMAÇÕES
   ========================================== */

.animate-fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   LOADING STATES
   ========================================== */

.loading-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    color: transparent;
    display: inline-block;
    min-width: 100px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   BADGES E ELEMENTOS
   ========================================== */

.badge-destaque {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

/* ==========================================
   SOCIAL ICONS
   ========================================== */

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-4px);
}

/* ==========================================
   PLACEHOLDERS DE IMAGEM
   ========================================== */

.img-placeholder {
    background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-placeholder i {
    font-size: 4rem;
    color: #9CA3AF;
}

.image-fallback {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.imovel-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 2rem;
}

/* ==========================================
   FEEDBACK E MENSAGENS
   ========================================== */

.mensagem-feedback {
    transition: all 0.3s ease;
}

/* ==========================================
   RESPONSIVIDADE MOBILE
   ========================================== */

@media (max-width: 768px) {
    .profile-avatar {
        border-width: 3px;
    }
    
    .hero-banner-content {
        height: 160px;
    }
    
    .profile-section {
        margin-top: -60px;
    }
}