/* ✅ HERO FLEXÍVEL - SUPORTE A IMAGEM + GRADIENTE */
.hero-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.hero-bg.with-image {
    /* Overlay para legibilidade do texto sobre imagem */
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    opacity: 0.8;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.property-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.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: 2px 2px 3px #999;
    z-index: 100;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.mensagem-feedback {
    transition: all 0.3s ease;
}

.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); }
}

/* === ESTILOS DO BANNER DE ANÚNCIO === */
.ad-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.5s ease-in-out, opacity 0.3s ease;
    background: transparent;
}

.ad-banner.show {
    transform: translateY(0);
}

.ad-banner.hide {
    opacity: 0;
    transform: translateY(-100%);
}

.ad-banner-content {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
}

.ad-banner-image {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.ad-banner-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.ad-banner-close:hover {
    background: rgba(0,0,0,0.9);
}

.ad-banner-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255,255,255,0.9);
    transition: width 0.1s linear;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Ajuste para empurrar o conteúdo quando banner está visível */
.content-wrapper {
    transition: margin-top 0.5s ease-in-out;
}

.content-wrapper.with-banner {
    margin-top: 150px; /* Altura da imagem */
}

/* === ESTILOS DO POPUP DE BUSCA === */
.search-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-popup.show {
    opacity: 1;
    visibility: visible;
}

.search-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.search-popup-image {
    width: 100%;
    height: auto;
    max-width: 400px;
    max-height: 600px;
    object-fit: contain;
    display: block;
}

.search-popup-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.1s linear;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsivo para popup */
@media (max-width: 768px) {
    .search-popup-content {
        max-width: 95%;
        max-height: 85%;
    }
    
    .search-popup-image {
        max-width: 350px;
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .search-popup-image {
        max-width: 300px;
        max-height: 400px;
    }
}

/* Responsivo banner original */
@media (max-width: 768px) {
    .ad-banner-image {
        max-height: 120px;
    }
    
    .ad-banner-close {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }
    
    .content-wrapper.with-banner {
        margin-top: 120px; /* Altura menor no mobile */
    }
}

@media (max-width: 480px) {
    .ad-banner-image {
        max-height: 100px;
    }
    
    .content-wrapper.with-banner {
        margin-top: 100px;
    }
}

/* ✅ PLACEHOLDER PARA TEXTOS CARREGANDO */
.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;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ✅ IMAGENS COM FALLBACK SUAVE */
.image-fallback {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* ✅ IMAGEM PLACEHOLDER PARA IMÓVEIS SEM FOTO */
.imovel-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 2rem;
}