.card-imoveis-img {
    background: #c5c5c5;
    height: 200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    border-radius: 10px 0px 0px 10px;
    object-fit: cover;
    object-position: center;
    overflow: hidden;
    padding: 0;
    position: relative;
    z-index: 1;
}
.card-imoveis-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 8px 0 0;
    display: block;
}
.card-imovel {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: visible;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
}
.card-imovel .card-body {
    overflow: visible !important;
}

.card-imovel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 2;
}
.card-body {
    position: relative;
    z-index: 1;
}
.card-imovel .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    height: 100%;
    padding: 0.6rem;
}
.card-title {
    font-size: 1.1rem;
    line-height: 1.3;
    color: #2c3e50;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 1rem;
    max-width: calc(100% - 50px);
}
.descricao-imovel {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1rem;
}
.valores-imovel {
    margin-bottom: 0.5rem !important;
    display: flex;
    flex-direction: row;
    gap: 1rem;
}
.valor-principal {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.valor-locacao {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.valor-texto {
    font-size: 0.6rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.valor-preco {
    font-size: 1rem;
    font-weight: 700;
    color: #28a745;
    line-height: 1.2;
}
.valor-locacao .valor-preco {
    color: #28a745;
}
.acoes-imovel {
    margin-top: auto;
}
.acoes-imovel .d-flex {
    gap: 0.5rem;
    align-items: center;
}
.gap-2 {
    gap: 0.5rem;
    align-items: center;
}
.acoes-imovel .btn {
    line-height: 1;
    padding: 0.375rem 0.75rem;
}
.botoes-compartilhamento {
    display: flex;
    gap: 0.25rem;
}
.botoes-compartilhamento .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
}









.btn-whatsapp {
    background-color: #25d366;
    border-color: #25d366;
    color: white;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    filter: brightness(0) invert(1); /* Torna a imagem branca */
}
.btn-whatsapp:hover {
    background-color: #128c7e;
    border-color: #128c7e;
    color: white;
}
.btn-ver-detalhes {
    border-color: #2D587A;
    color: #2D587A;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-ver-detalhes .fa-eye {
    margin-right: 3px;
}
.btn-ver-detalhes:hover {
    background-color: #2D587A;
    border-color: #2D587A;
    color: white;
}
.btn-success {
    background-color: #25d366;
    border-color: #25d366;
}
.btn-success:hover {
    background-color: #128c7e;
    border-color: #128c7e;
}
.mb-1.text-muted.d-flex.align-items-center.gap-1 {
    min-height: 40px;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
}

/* Estilos para compartilhamento */
.compartilhamento-container {
    position: relative;
    z-index: 10;
}

.btn-compartilhar {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.1rem;
    padding: 0.25rem;
    cursor: pointer;
    transition: color 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sobrescrever o outline do Bootstrap para o botão de compartilhamento */
.btn-compartilhar:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Estilos para ícones de imagem das redes sociais */
.share-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.opcao-compartilhamento a:hover .share-icon {
    transform: scale(1.1);
}

.opcao-compartilhamento .fas.fa-link {
    color: #6c757d;
    font-size: 1.2rem;
}

.btn-compartilhar:hover {
    color: #2D587A;
    background-color: rgba(45, 88, 122, 0.1);
}

.opcoes-compartilhamento {
    position: absolute;
    top: 0;
    right: 100%;
    margin-right: 10px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 120px;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px) scale(0.8);
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

.opcoes-compartilhamento.ativo {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
}

.opcao-compartilhamento {
    border-right: 1px solid #f8f9fa;
}

.opcao-compartilhamento:last-child {
    border-right: none;
}

.opcao-compartilhamento a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.4rem;
    color: #495057;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 1.2rem;
    min-height: 40px;
    min-width: 40px;
}

.opcao-compartilhamento a:hover {
    background-color: #f8f9fa;
    color: #2D587A;
    text-decoration: none;
}

.opcao-compartilhamento i {
    font-size: 1.2rem;
    text-align: center;
}



.opcao-compartilhamento .fas.fa-link {
    color: #6c757d;
}

/* ===== ESTILOS PARA COMPARTILHAMENTO MOBILE ===== */

/* Ocultar botão de compartilhamento mobile na versão desktop */
.compartilhamento-mobile-container {
    display: none;
}

/* ===== ESTILOS RESPONSIVOS PARA MOBILE ===== */

/* Layout mobile - reorganizar elementos em coluna */
@media (max-width: 768px) {
    /* Container principal - filtro primeiro, depois lista */
    .imoveis-flex-layout {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    /* Filtro lateral ocupa toda a largura */
    .imoveis-flex-layout > div:first-child {
        width: 100% !important;
        order: 1;
    }
    
    /* Lista de imóveis ocupa toda a largura */
    .imoveis-lista-flex {
        width: 100% !important;
        order: 2;
    }
    
    /* Cards de imóveis em layout vertical */
    .card-imovel .row {
        flex-direction: column !important;
    }
    
    .card-imovel .col-md-4 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .card-imovel .col-md-8 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    /* Imagem do imóvel - altura fixa e bordas arredondadas */
    .card-imoveis-img {
        height: 250px !important;
        border-radius: 8px 8px 0 0 !important;
        margin-bottom: 0;
    }
    
    .card-imoveis-img img {
        border-radius: 8px 8px 0 0 !important;
    }
    
    /* Corpo do card - padding ajustado */
    .card-imovel .card-body {
        padding: 1rem !important;
        min-height: auto !important;
        height: auto !important;
    }
    
    /* Título - quebra de linha permitida */
    .card-title {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        margin-bottom: 0.5rem !important;
        font-size: 1.2rem !important;
        line-height: 1.4 !important;
        max-width: 100% !important;
        margin-right: 0 !important;
    }
    
    /* Descrição - mais espaço */
    .descricao-imovel {
        margin-bottom: 1rem !important;
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        -webkit-line-clamp: 3 !important;
    }
    
    /* Valores - layout vertical */
    .valores-imovel {
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .valor-principal,
    .valor-locacao {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0.5rem;
        background-color: #f8f9fa;
        border-radius: 6px;
    }
    
    .valor-texto {
        font-size: 0.7rem !important;
        margin-bottom: 0 !important;
    }
    
    .valor-preco {
        font-size: 1.1rem !important;
    }
    
    /* Ações - layout vertical */
    .acoes-imovel {
        margin-top: 1rem !important;
    }
    
    .acoes-imovel .d-flex {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: stretch !important;
    }
    
    /* Botões - largura total */
    .acoes-imovel .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.75rem !important;
        font-size: 0.95rem !important;
        height: auto !important;
    }
    
    /* Botão WhatsApp */
    .btn-whatsapp {
        order: 1;
    }
    
    /* Botão Ver Detalhes */
    .btn-ver-detalhes {
        order: 2;
    }
    
    /* ===== ESTILOS ESPECÍFICOS PARA COMPARTILHAMENTO MOBILE ===== */
    
    /* Ocultar botão de compartilhamento original na versão mobile */
    .compartilhamento-container {
        display: none !important;
    }
    
    /* Mostrar botão de compartilhamento mobile */
    .compartilhamento-mobile-container {
        display: block !important;
        position: relative !important;
        order: 2;
    }
    
    /* Botão de compartilhamento mobile */
    .btn-compartilhar-mobile {
        background: linear-gradient(135deg, #6c757d, #495057) !important;
        border: none !important;
        color: white !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 0.75rem !important;
        font-size: 0.95rem !important;
        height: auto !important;
        transition: all 0.2s ease !important;
    }
    
    .btn-compartilhar-mobile:hover {
        background: linear-gradient(135deg, #495057, #343a40) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
        color: white !important;
    }
    
    .btn-compartilhar-mobile:focus {
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.3) !important;
    }
    
    /* Menu de compartilhamento mobile */
    .opcoes-compartilhamento-mobile {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        border: 1px solid #e9ecef !important;
        border-radius: 8px !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-10px) scale(0.95) !important;
        transform-origin: top center !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1000 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        padding: 0.5rem !important;
        margin-top: 0.5rem !important;
    }
    
    .opcoes-compartilhamento-mobile.ativo {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
    }
    
    /* Opções de compartilhamento mobile */
    .opcao-compartilhamento-mobile {
        margin: 0.25rem !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }
    
    .opcao-compartilhamento-mobile a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.75rem !important;
        color: #495057 !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
        background-color: #f8f9fa !important;
        border-radius: 8px !important;
        min-width: 50px !important;
        min-height: 50px !important;
        font-size: 1.2rem !important;
    }
    
    .opcao-compartilhamento-mobile a:hover {
        background-color: #e9ecef !important;
        color: #2D587A !important;
        text-decoration: none !important;
        transform: scale(1.05) !important;
    }
    
    /* Ícones de compartilhamento mobile */
    .share-icon-mobile {
        width: 24px !important;
        height: 24px !important;
        object-fit: contain !important;
        transition: transform 0.2s ease !important;
    }
    
    .opcao-compartilhamento-mobile a:hover .share-icon-mobile {
        transform: scale(1.1) !important;
    }
    
    .opcao-compartilhamento-mobile .fas.fa-link {
        color: #6c757d !important;
        font-size: 1.2rem !important;
    }
    
    /* Botão Ver Detalhes ajustado para mobile */
    .btn-ver-detalhes {
        order: 3 !important;
    }
    
    /* Compartilhamento - posicionamento ajustado */
    .compartilhamento-container {
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        z-index: 20 !important;
    }
    
    .btn-compartilhar {
        background-color: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(5px);
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 1.2rem !important;
    }
    
    /* Menu de compartilhamento - posicionamento ajustado */
    .opcoes-compartilhamento {
        top: 0% !important;
        right: 110% !important;
        margin-right: 0 !important;
        transform: translateY(-10px) scale(0.9) !important;
        transform-origin: top right !important;
        flex-direction: column !important;
        min-width: 150px !important;
    }
    
    .opcoes-compartilhamento.ativo {
        transform: translateY(0) scale(1) !important;
        display: flex;
        flex-direction: row !important;
        align-items: center;
    }
    
    .opcao-compartilhamento {
        border-right: none !important;
        border-bottom: 1px solid #f8f9fa !important;
    }
    
    .opcao-compartilhamento:last-child {
        border-bottom: none !important;
    }
    
    .opcao-compartilhamento a {
        padding: 0.75rem !important;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
    }
    
    /* Espaçamento geral */
    .card-imovel {
        margin-bottom: 1.5rem !important;
    }
    
    /* Container principal */
    .main-imoveis {
        padding: 1rem !important;
    }
    
    /* Ajustes para telas muito pequenas */
    @media (max-width: 480px) {
        .card-imoveis-img {
            height: 200px !important;
        }
        
        .card-title {
            font-size: 1.1rem !important;
        }
        
        .descricao-imovel {
            font-size: 0.9rem !important;
        }
        
        .valor-preco {
            font-size: 1rem !important;
        }
        
        .acoes-imovel .btn {
            padding: 0.6rem !important;
            font-size: 0.9rem !important;
        }
        
        /* Ajustes para compartilhamento mobile em telas pequenas */
        .opcoes-compartilhamento-mobile {
            flex-direction: row !important;
            flex-wrap: wrap !important;
            justify-content: center !important;
            gap: 0.25rem !important;
        }
        
        .opcao-compartilhamento-mobile {
            margin: 0.125rem !important;
        }
        
        .opcao-compartilhamento-mobile a {
            padding: 0.6rem !important;
            min-width: 45px !important;
            min-height: 45px !important;
        }
        
        .share-icon-mobile {
            width: 20px !important;
            height: 20px !important;
        }
    }
}

/* ===== MELHORIAS PARA TABLETS ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .card-imovel .card-body {
        padding: 0.8rem !important;
    }
    
    .card-title {
        font-size: 1rem !important;
    }
    
    .descricao-imovel {
        font-size: 0.85rem !important;
    }
    
    .valores-imovel {
        gap: 0.75rem !important;
    }
    
    .valor-preco {
        font-size: 0.95rem !important;
    }
}

/* ===== MELHORIAS ADICIONAIS PARA MOBILE ===== */

/* Melhorar a experiência de toque em dispositivos móveis */
@media (max-width: 768px) {
    /* Aumentar área de toque para botões */
    .btn-compartilhar {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .acoes-imovel .btn {
        min-height: 44px !important;
        touch-action: manipulation;
    }
    
    /* Melhorar espaçamento entre elementos */
    .card-imovel {
        margin-bottom: 1.5rem !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }
    
    /* Adicionar sombra mais suave para mobile */
    .card-imovel {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    }
    
    .card-imovel:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
        transform: none !important;
    }
    
    /* Melhorar legibilidade do texto */
    .card-title {
        font-weight: 600 !important;
        color: #1a1a1a !important;
    }
    
    .descricao-imovel {
        color: #4a4a4a !important;
        line-height: 1.6 !important;
    }
    
    /* Melhorar contraste dos valores */
    .valor-preco {
        color: #2d5a3d !important;
        font-weight: 700 !important;
    }
    
    .valor-texto {
        color: #666 !important;
        font-weight: 500 !important;
    }
    
    /* Melhorar botões de ação */
    .btn-whatsapp {
        background: linear-gradient(135deg, #25d366, #128c7e) !important;
        border: none !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .btn-ver-detalhes {
        background: linear-gradient(135deg, #2D587A, #1e3a5f) !important;
        border: none !important;
        color: white !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .btn-whatsapp:hover,
    .btn-ver-detalhes:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    }
    
    /* Melhorar menu de compartilhamento */
    .opcoes-compartilhamento {
        border-radius: 12px !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
        border: 1px solid rgba(0,0,0,0.08) !important;
    }
    
    .opcao-compartilhamento a {
        border-radius: 8px !important;
        margin: 2px !important;
        transition: all 0.2s ease !important;
    }
    
    .opcao-compartilhamento a:hover {
        background-color: #f0f8ff !important;
        transform: scale(1.05) !important;
    }
    
    /* Melhorar responsividade da imagem */
    .card-imoveis-img {
        position: relative !important;
        overflow: hidden !important;
    }
    
    .card-imoveis-img::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.1) 100%);
        pointer-events: none;
        z-index: 1;
    }
    
    .card-imoveis-img img {
        transition: transform 0.3s ease !important;
    }
    
    .card-imovel:hover .card-imoveis-img img {
        transform: scale(1.05) !important;
    }
    
    /* Melhorar espaçamento geral */
    .main-imoveis {
        padding: 0.75rem !important;
    }
    
    /* Adicionar indicador visual para valores */
    .valor-principal,
    .valor-locacao {
        position: relative !important;
        overflow: hidden !important;
    }
    
    .valor-principal::before,
    .valor-locacao::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, #28a745, #20c997);
        border-radius: 0 2px 2px 0;
    }
       
    /* Adicionar animação suave para carregamento */
    .card-imovel {
        animation: fadeInUp 0.4s ease-out !important;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ===== OTIMIZAÇÕES PARA TELAS MUITO PEQUENAS ===== */
@media (max-width: 375px) {
    .card-imoveis-img {
        height: 180px !important;
    }
    
    .card-title {
        font-size: 1rem !important;
    }
    
    .descricao-imovel {
        font-size: 0.85rem !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .valor-preco {
        font-size: 0.95rem !important;
    }
    
    .acoes-imovel .btn {
        padding: 0.5rem !important;
        font-size: 0.85rem !important;
    }
    
    .main-imoveis {
        padding: 0.5rem !important;
    }
}
