/*
Theme Name: Tema Imobiliária
Theme URI: https://filomenoimoveis.com.br/
Author: Alessandro C Boeira
Description: Tema personalizado focado em performance e usabilidade.
Version: 1.0.4 (Correção Final Layout e Busca)
*/

/* ===================================================================
   1. RESET, VARIÁVEIS E BASE
=================================================================== */
:root {
    --primary-color: #003366;
    --primary-hover: #0055a4;
    --secondary-color: #0073aa;
    --whatsapp-color: #25D366;
    --whatsapp-hover: #128C7E;
    --text-color: #333;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --border-color: #ddd;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0; padding: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--secondary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em; font-weight: 600; color: var(--primary-color); }

/* Centralização de Títulos na Home (Ajuste Fino) */
body.home h2 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
    position: relative;
    display: block;
}
/* Detalhe visual abaixo do título */
body.home h2::after {
    content: ''; display: block; width: 60px; height: 3px;
    background-color: var(--primary-color); margin: 10px auto 0;
}
/* Espaço extra para o carrossel na home */
.destaques-carousel { margin-bottom: 50px; }


/* ===================================================================
   2. COMPONENTES COMPARTILHADOS (BOTÕES E INPUTS)
=================================================================== */
.search-form input[type="search"],
.search-form input[type="number"],
.search-form select,
.wpcf7-form .wpcf7-form-control {
    width: 100%; padding: 12px; border: 1px solid #ccc;
    border-radius: 5px; font-size: 1em; background-color: var(--bg-color);
}
.wpcf7-form .wpcf7-form-control { background-color: var(--white); }

/* Botões Primários (Azul) */
.search-form .search-submit,
.wpcf7-form .wpcf7-submit,
.wpcf7-form input.btn-denuncia,
.btn-voltar-home,
a.btn-denuncia-link {
    display: inline-block; padding: 12px 30px; width: 100%;
    background-color: var(--primary-color); color: var(--white);
    border: none; border-radius: 5px; font-size: 1em; font-weight: bold;
    cursor: pointer; text-align: center; text-decoration: none;
    transition: background-color 0.3s ease;
}

.search-form .search-submit:hover,
.wpcf7-form .wpcf7-submit:hover,
.wpcf7-form input.btn-denuncia:hover,
.btn-voltar-home:hover {
    background-color: var(--primary-hover); text-decoration: none;
}

/* Botão Denúncia (Hover Vermelho) */
a.btn-denuncia-link:hover,
.wpcf7-form input.btn-denuncia:hover { background-color: #DC3545; }

/* Botões WhatsApp (Verde) */
.btn-whatsapp,
.btn-whatsapp-trigger,
.modal-content .btn-whatsapp-modal {
    display: block; width: 100%; margin-top: 15px; padding: 12px 25px;
    background-color: var(--whatsapp-color); color: var(--white);
    font-size: 1.2em; font-weight: bold; text-decoration: none; text-align: center;
    border: none; border-radius: 5px; cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-whatsapp:hover,
.btn-whatsapp-trigger:hover,
.modal-content .btn-whatsapp-modal:hover {
    background-color: var(--whatsapp-hover); color: var(--white);
}

/* Mídia Responsiva */
.video-responsive, .map-responsive {
    position: relative; height: 0; overflow: hidden; max-width: 100%;
    background: #000; border-radius: 8px;
}
.video-responsive { padding-bottom: 56.25%; margin: 40px 0; }
.map-responsive { padding-bottom: 50%; border: 1px solid #ccc; background: #eee; }
.video-responsive iframe, .map-responsive iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* ===================================================================
   3. ESTRUTURA E LAYOUT
=================================================================== */
.container { max-width: 1600px; margin: 0 auto; padding: 0 15px; }

.site-header, .site-footer {
    background-color: var(--white); padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.site-header { box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.header-container, .footer-container { display: flex; justify-content: space-between; align-items: center; }

.site-branding a { font-size: 1.8em; font-weight: bold; color: #222; }

.main-navigation ul, .footer-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-navigation li { margin-left: 20px; }
.footer-navigation li { margin-right: 20px; }

.main-navigation a { color: #444; font-weight: 500; padding: 10px 15px; border-radius: 5px; }
.main-navigation a:hover { background-color: #f0f0f0; text-decoration: none; }

.site-footer { border-top: 1px solid var(--border-color); border-bottom: none; margin-top: 40px; padding: 20px 0; }
.site-info { color: #777; }

/* ===================================================================
   4. GRADE DE IMÓVEIS (CARDS)
=================================================================== */
.imoveis-grid { display: flex; flex-wrap: wrap; margin: 0 -15px; }

.imovel-card {
    background-color: var(--white); border: 1px solid #e5e5e5;
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease-in-out; margin: 15px;
    width: calc(100% - 30px); /* Mobile Default */
}
.imovel-card:hover { box-shadow: 0 8px 16px rgba(0,0,0,0.1); transform: translateY(-5px); }

.imovel-card .card-link { display: block; color: inherit; }
.imovel-card .card-link:hover { text-decoration: none; }
.card-image { position: relative; }
.card-image img { width: 100%; height: 280px; object-fit: cover; }

.card-price {
    position: absolute; bottom: 10px; right: 10px;
    background-color: rgba(0, 51, 102, 0.8); color: var(--white);
    padding: 5px 15px; border-radius: 5px; font-size: 1.1em; font-weight: bold;
}
.card-content { padding: 20px; }
.entry-title { font-size: 1.2em; margin-bottom: 10px; color: var(--text-color); }

.imovel-features {
    list-style: none; padding: 0; margin: 0; display: flex;
    justify-content: space-between; color: #666; font-size: 0.9em;
}
.imovel-features li { display: flex; align-items: center; }
.imovel-features .icon { margin-right: 5px; }

.pagination { margin-top: 40px; text-align: center; }
.pagination .page-numbers {
    padding: 8px 15px; margin: 0 5px; border: 1px solid var(--border-color);
    border-radius: 5px; color: var(--secondary-color);
}
.pagination .page-numbers.current {
    background-color: var(--secondary-color); color: var(--white);
    border-color: var(--secondary-color);
}

/* Carrossel */
.destaques-carousel .imovel-card { width: 100%; margin: 0; }
.swiper-button-next, .swiper-button-prev, .swiper-pagination-bullet-active { color: var(--primary-color); background: none; }
.swiper-pagination-bullet-active { background: var(--primary-color); }

/* ===================================================================
   5. PÁGINA ÚNICA (SINGLE) E SIDEBAR
=================================================================== */
.single-imovel-main .entry-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.single-imovel-main .entry-title { font-size: 2.5em; }

.imovel-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 30px; }
.imovel-gallery a { display: block; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1); cursor: zoom-in; }
.imovel-gallery img { width: 100%; height: 150px; object-fit: cover; transition: transform 0.3s ease; }
.imovel-gallery a:hover img { transform: scale(1.05); }

.imovel-content-wrapper { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 30px; }
.imovel-main-details { flex: 2; min-width: 300px; }

.imovel-main-details h2, .imovel-main-details h3, .imovel-sidebar h3 {
    margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee;
    color: var(--primary-color);
}
.imovel-sidebar h3 { border-bottom: none; margin-top: 0; }

.price-detail { color: #006400; font-size: 1.5em; font-weight: bold; margin-bottom: 15px; }
.code-detail { font-size: 1.5em; font-weight: bold; margin-bottom: 15px; color: var(--text-color); }
.description-detail { margin-bottom: 30px; line-height: 1.7; }

.features-list, .options-list { list-style: none; padding: 0; margin: 0 0 30px 0; font-size: 1.15em; }
.features-list li, .options-list li { padding: 8px 0; border-bottom: 1px dashed #eee; }
.features-list li strong { display: inline-block; width: 180px; color: #555; }
.options-list li { color: #006400; }

.imovel-sidebar { flex: 1; min-width: 280px; background-color: #f0f5f9; padding: 25px; border-radius: 8px; border: 1px solid #d0e0ea; }

.corretor-box {
    background-color: var(--white); border: 1px solid #d0e0ea;
    border-left: 4px solid var(--primary-color); border-radius: 5px;
    padding: 15px; margin: 20px 0 35px;
}
.corretor-box .corretor-title { font-size: 0.9em; font-weight: 600; color: var(--primary-color); margin-bottom: 8px; }
.corretor-box .corretor-nome { font-size: 1.1em; font-weight: bold; color: #555; }
.corretor-box .corretor-creci { font-size: 0.9em; color: #777; margin-top: 4px; }
.corretor-box .corretor-link { display: block; margin-top: 10px; font-size: 0.9em; font-weight: 600; color: var(--secondary-color); }

/* ===================================================================
   6. FORMULÁRIOS, UTILITÁRIOS E MODAL
=================================================================== */
/* Estilos base do form de busca */
.search-form {
    display: flex; flex-wrap: wrap; gap: 15px;
    background-color: var(--white); padding: 20px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); align-items: flex-end;
}
.search-form .form-row { flex: 1; display: flex; flex-direction: column; min-width: 180px; }
.search-form .form-row-small { flex-grow: 0.5; min-width: 140px; }
.search-form label, .wpcf7-form label { font-size: 0.9em; font-weight: 600; margin-bottom: 5px; color: #555; display: block; }
.search-form .search-submit { flex: 0 0 auto; width: auto; }

.wpcf7-form p { margin: 0 0 15px 0; }
.wpcf7-form textarea { height: 120px; }
.sidebar-only-field, .imovel-sidebar .modal-only-title { display: none; }
.imovel-sidebar .sidebar-only-field { display: block; }

.no-results-found {
    text-align: center; padding: 60px 20px; width: 100%;
    font-size: 1.2em; color: #555; background-color: #fff;
    border: 1px dashed #ddd; border-radius: 8px;
}
.btn-voltar-home { width: auto; margin-top: 25px; }
/* Floating WhatsApp e Modal */
/* Floating WhatsApp (Versão Retangular Adaptável) */
.floating-whatsapp-btn {
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    z-index: 1000;
    background-color: transparent;  /*background-color: var(--whatsapp-color);*/
    width: auto;              /* Deixa a largura livre para caber o texto */
    height: auto;             /* Deixa a altura livre */
    padding: 0;       /* Cria espaço interno (respiro) anterior 12px 25px */
    border-radius: 8px;      /* Formato "Pílula" (arredondado nas pontas) */
    /* Se preferir cantos quadrados, mude 50px para 8px */
    box-shadow: none; /* valor antigo = 0 4px 12px rgba(0,0,0,0.2); */
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: transform 0.3s ease;
}
.floating-whatsapp-btn:hover { 
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.floating-whatsapp-btn img { 
     /* 4. O segredo para não achatar a imagem */
    width: auto !important;       /* Respeita a proporção original da largura */
    height: 55px !important;      /* Define uma altura fixa (ajuste esse valor se ficar pequeno) */
    object-fit: contain !important; /* Garante que a imagem nunca será esticada/achatada */
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    /*max-width: none !important;    Permite que a imagem seja larga */
}

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); z-index: 9998;
    display: flex; align-items: center; justify-content: center;
}
.modal-content {
    position: relative; background-color: var(--white); padding: 30px;
    border-radius: 8px; max-width: 500px; width: 90%; z-index: 9999;
}
.modal-close {
    position: absolute; top: 10px; right: 15px; background: none;
    border: none; font-size: 2.5em; line-height: 1; color: #aaa; cursor: pointer;
}
.hidden-contact-info { display: none; }
.form-legenda { margin-top: 20px; border-top: 1px solid #eee; padding-top: 15px; }
.form-legenda p { font-size: 0.9em; color: #777; margin: 0 0 10px 0; }

/* ===================================================================
   8. MEDIA QUERIES (RESPONSIVIDADE E LAYOUT)
=================================================================== */

/* --- MOBILE (Até 767px) --- */
@media (max-width: 767px) {
    
    /* Botão Gatilho Busca */
    .mobile-search-toggle {
        display: block; width: 100%; padding: 15px;
        background-color: var(--primary-color); color: var(--white);
        font-size: 1.1em; font-weight: bold; border: none; border-radius: 5px;
        cursor: pointer; margin-bottom: 10px; text-align: center;
    }
    .mobile-search-toggle:hover { background-color: var(--primary-hover); }

    /* Caixa de Campos (Oculta por padrão) */
    .search-fields-wrapper {
        display: none; flex-wrap: wrap; gap: 10px;
        background: #fff; padding: 15px; border: 1px solid #eee;
        border-radius: 5px; margin-bottom: 20px;
    }
    .search-fields-wrapper.active { display: flex; }

    /* Campos em 2 Colunas */
    .search-fields-wrapper .form-row { flex: 0 0 48%; min-width: 0; margin-bottom: 0; }
    .search-fields-wrapper .form-row:first-child { flex: 0 0 100%; } /* Palavra-chave */

    /* Ajustes Inputs */
    .search-fields-wrapper input, .search-fields-wrapper select { height: 40px; font-size: 0.9em; padding: 5px 8px; }
    .search-fields-wrapper label { font-size: 0.85em; margin-bottom: 3px; }

    /* Botão Pesquisar */
    .search-fields-wrapper .form-row-submit { flex: 0 0 100%; margin-top: 10px; }
    .search-fields-wrapper .search-submit { width: 100%; padding: 12px; }
}

/* --- TABLET E DESKTOP (A partir de 768px) --- */
@media (min-width: 768px) {
    
    /* Grade de Imóveis (2 Colunas) */
    .imoveis-grid .imovel-card { width: calc(50% - 30px); }

    /* Busca Híbrida - Desktop (Força Horizontal) */
    .mobile-search-toggle { display: none !important; }

    .search-fields-wrapper {
        display: flex !important; width: 100%; flex-wrap: wrap;
        gap: 15px; align-items: flex-end;
        background: transparent; border: none; padding: 0;
    }

    .search-fields-wrapper .form-row { flex: 1; min-width: 150px; margin-bottom: 0; }
    .search-fields-wrapper .form-row-submit { flex: 0 0 auto; margin-top: 0; }
    .search-fields-wrapper .search-submit { width: auto; padding: 12px 25px; }
}

/* --- DESKTOP GRANDE (A partir de 1024px) --- */
@media (min-width: 1024px) {
    /* Grade de Imóveis (3 Colunas) */
    .imoveis-grid .imovel-card { width: calc(33.333% - 30px); }
}


/* ===================================================================
   9. BREADCRUMBS (RANK MATH) - INTEGRAÇÃO AO TEMA
=================================================================== */
.breadcrumb-wrapper {
    background-color: var(--white); /* Usa o branco padrão do tema em vez de cinza */
    border-bottom: 1px solid var(--border-color); /* Mesma borda usada no header */
    padding: 12px 0; /* Espaçamento levemente maior para respirar */
    margin-bottom: 40px; /* Mantém o ritmo vertical do layout */
    font-size: 0.9em; /* Tamanho legível, mas hierarquicamente menor */
    color: #666; /* Cinza neutro para texto secundário */
}

/* Links do Breadcrumb */
.breadcrumb-wrapper a {
    color: var(--primary-color); /* Usa o azul secundário (#0073aa) padrão dos teus links */
    font-weight: 600; /* Um pouco mais de peso para destacar que é clicável */
    text-decoration: none;
    transition: color 0.3s ease; /* Mesma transição suave do resto do site */
}

.breadcrumb-wrapper a:hover {
    color: var(--secondary-color); /* Muda para o azul escuro (#003366) ao passar o mouse */
    text-decoration: underline;
}

/* O último item (página atual) */
.breadcrumb-wrapper .last {
    color: var(--text-color); /* Usa a cor de texto padrão (#333) */
    font-weight: 600; /* Destaque sutil para mostrar onde o usuário está */
    cursor: default;
}

/* Separador (Geralmente uma barra ou seta gerada pelo Rank Math) */
.breadcrumb-wrapper .separator {
    margin: 0 8px;
    color: var(--primary-color); /* Azul escuro também no separador */
    opacity: 0.5; /* Leve transparência para não brigar com o texto */
    /*color: #999;*/
}

/* Ajuste Mobile (Alinhado com as Media Queries do teu CSS) */
@media (max-width: 767px) {
    .breadcrumb-wrapper {
        padding: 10px 0;
        font-size: 0.85em; /* Levemente menor no mobile */
        margin-bottom: 25px; /* Reduz espaço vertical no mobile */
        white-space: nowrap;
        overflow-x: auto; /* Scroll horizontal se o caminho for muito longo */
        -webkit-overflow-scrolling: touch; /* Scroll suave no iOS */
    }
    
    /* Remove a barra de rolagem visual mas mantém a função */
    .breadcrumb-wrapper::-webkit-scrollbar {
        display: none; 
    }
}




































