@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Open+Sans:wght@400;600&display=swap');

:root {
    --primary: #ffffff;       /* Preto Fundo */
    --accent: #FFC600;        /* AMARELO REZENDE (Igual a foto) */
    --input-bg: #1F1F1F;      /* Fundo dos campos de busca */
    --text-white: #ffffff;
    --text-dark: #333333;
    --bg-body: #F5F5F5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background-color: var(--bg-body); 
    font-family: 'Open Sans', sans-serif; 
    overflow-x: hidden;
}

h1, h2, h3, h4, .btn-search { font-family: 'Montserrat', sans-serif; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- HEADER (Transparente e Flutuante) --- */
header { 
    position: absolute; /* Flutua sobre a imagem */
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
}

.logo img { height: 50px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8)); }

nav ul { display: flex; gap: 30px; }
nav a { 
    color: var(--text-white); 
    font-weight: 600; 
    font-size: 14px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}
nav a:hover { color: var(--accent); }
.menu-mobile { display: none; color: white; font-size: 30px; cursor: pointer; }

/* --- HERO SECTION (A Capa Grande) --- */
.hero { 
    position: relative;
    height: 100vh; /* Tela Cheia */
    background: #111; /* Cor de fundo caso a imagem falhe */
    /* ATENÇÃO: Coloque uma imagem de alta qualidade em assets/img/capa.jpg */
    background-image: url('../img/capa.webp'); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay Escuro (Para o texto aparecer) */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 60px; /* Compensa o header */
}

.hero h1 {
    color: var(--text-white);
    font-size: 3rem;
    text-align: center;
    font-weight: 800;
    margin-bottom: 50px;
    line-height: 1.2;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* --- BARRA DE BUSCA (ESTILO REZENDE) --- */
.search-form {
    width: 100%;
    display: flex;
    gap: 15px;
    background: transparent;
}

/* Estilo dos Inputs (Blocos Escuros) */
.input-group {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: 0.3s;
}

.input-group:hover { border-color: #555; }

.input-group label {
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.input-group select, .input-group input {
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    outline: none;
    cursor: pointer;
}
.input-group select option { background: #222; color: white; }

/* Botão Amarelo */
.btn-search {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0 40px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    height: auto; /* Acompanha a altura dos inputs */
}
.btn-search:hover { background: #e5b200; transform: scale(1.02); }

/* --- LISTAGEM DE IMÓVEIS (CLEAN) --- */
.container { max-width: 1200px; margin: 60px auto; padding: 0 20px; }
.section-title { font-size: 2rem; color: var(--text-dark); margin-bottom: 40px; text-align: center; font-weight: 700; }

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 30px; 
}

.card { 
    background: white; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); 
    transition: 0.3s;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.card-img-wrapper { position: relative; height: 250px; }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 15px; left: 15px; background: rgba(0,0,0,0.8); color: white; padding: 5px 12px; font-size: 12px; border-radius: 4px; font-weight: bold; text-transform: uppercase; }

.card-body { padding: 25px; flex: 1; }
.card-price { font-size: 1.6rem; font-weight: 800; color: var(--text-dark); display: block; margin-bottom: 5px; }
.card-title { font-size: 1.1rem; color: #666; font-weight: 600; margin-bottom: 10px; }
.card-features { display: flex; gap: 15px; border-top: 1px solid #eee; padding-top: 15px; margin-top: 15px; color: #888; font-size: 13px; font-weight: 600; }

.whatsapp-float { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 9999; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

/* --- RESPONSIVIDADE (MOBILE IGUAL FOTO 1) --- */
@media (max-width: 900px) {
    /* Menu */
    nav ul { display: none; } /* Adicionar JS para abrir depois */
    .menu-mobile { display: block; margin-left: auto; }

    /* Hero */
    .hero { height: auto; min-height: 100vh; padding: 120px 0 60px 0; }
    .hero h1 { font-size: 2rem; margin-bottom: 30px; }

    /* FORMULÁRIO EMPILHADO (A Chave do Layout) */
    .search-form { 
        flex-direction: column; /* Empilha */
        gap: 15px;
    }
    
    .input-group {
        width: 100%;
        height: 70px; /* Altura generosa pro dedo */
    }
    
    .btn-search {
        width: 100%;
        height: 60px; /* Botão grande */
    }
}



/* --- LAYOUT DETALHES (DARK & RESPONSIVO) --- */
.page-detalhes {
    background-color: #121212;
    color: #e0e0e0;
    min-height: 100vh;
    padding-bottom: 50px;
}

.detalhes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    /* PC: Conteúdo (2 partes) | Sidebar (1 parte) */
    grid-template-columns: 2fr 1fr; 
    gap: 40px;
}

/* Header */
.area-topo { grid-column: 1 / -1; margin-bottom: 20px; }
.imovel-header h1 { font-size: 2.2rem; color: #fff; margin: 10px 0; }
.breadcrumbs { color: var(--accent); font-size: 12px; text-transform: uppercase; font-weight: bold; }

/* GALERIA MOSAICO (PC) */
.galeria-mosaico {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* 3 colunas */
    grid-template-rows: 250px 250px;    /* 2 linhas fixas */
    gap: 10px;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
}

.galeria-item { position: relative; cursor: pointer; height: 100%; width: 100%; overflow: hidden; }
.galeria-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.galeria-item:hover img { transform: scale(1.05); }

/* A primeira foto ocupa 1ª coluna inteira e 2 linhas */
.galeria-item.item-0 { grid-column: 1 / 2; grid-row: 1 / 3; }

.ver-mais-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6);
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 1.2rem;
}

/* CONTEÚDO ESQUERDA */
.detalhes-content { display: flex; flex-direction: column; gap: 40px; }

/* Ícones de Características */
.features-box {
    display: flex; gap: 15px; flex-wrap: wrap; justify-content: space-between;
    background: #1e1e1e; padding: 20px; border-radius: 8px; border: 1px solid #333;
}
.feat-item { display: flex; flex-direction: column; align-items: center; min-width: 60px; }
.feat-icon { font-size: 24px; color: var(--accent); margin-bottom: 5px; }
.feat-item strong { color: #fff; font-size: 1.1rem; }
.feat-item span { font-size: 0.8rem; color: #888; text-transform: uppercase; }

/* Títulos das Seções */
.bloco-info h3 { 
    color: #fff; margin-bottom: 15px; font-size: 1.4rem; 
    border-left: 3px solid var(--accent); padding-left: 10px; 
}
.descricao-texto { font-size: 1rem; line-height: 1.8; color: #ccc; }

/* Vídeo & Mapa Responsivos */
.video-wrapper, .mapa-wrapper {
    width: 100%; background: #000; border-radius: 8px; overflow: hidden; border: 1px solid #333;
}
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; }
.video-wrapper iframe, .mapa-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.mapa-wrapper { height: 400px; position: relative; }

/* SIDEBAR (PC) */
.detalhes-sidebar { position: relative; }
.sidebar-card {
    background: #1e1e1e; border: 1px solid #333; border-radius: 12px;
    padding: 30px; position: sticky; top: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.tag-finalidade { 
    background: #333; color: #fff; padding: 5px 10px; 
    border-radius: 4px; text-transform: uppercase; font-size: 12px; 
}
.price-box { margin: 20px 0; border-bottom: 1px solid #333; padding-bottom: 20px; }
.price-main { display: block; font-size: 2.2rem; font-weight: 800; color: #fff; }
.price-sub { display: block; font-size: 0.9rem; color: #888; margin-top: 5px; }

.btn-amarelo {
    display: block; width: 100%; background: var(--accent); color: #000;
    text-align: center; padding: 18px; font-weight: 800; border-radius: 8px;
    text-transform: uppercase; margin-bottom: 20px; transition: 0.3s;
}
.btn-amarelo:hover { background: #ffdb4d; transform: translateY(-2px); }

.corretor-info { display: flex; align-items: center; gap: 15px; border-top: 1px solid #333; padding-top: 20px; }
.corretor-avatar { 
    width: 40px; height: 40px; background: #fff; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
}

/* ========================================= */
/* --- RESPONSIVIDADE TOTAL (MOBILE) --- */
/* ========================================= */
@media (max-width: 900px) {
    
    .detalhes-container {
        display: flex;         /* Muda de Grid para Flex */
        flex-direction: column; /* Empilha tudo verticalmente */
        padding: 15px;
        gap: 30px;
    }

    /* 1. Header Menor */
    .imovel-header h1 { font-size: 1.8rem; }

    /* 2. Galeria vira Carrossel de Deslizar */
    .galeria-mosaico {
        display: flex;             /* Vira uma linha flexível */
        grid-template-columns: none; /* Mata o grid */
        grid-template-rows: none;
        overflow-x: auto;          /* Permite rolagem lateral */
        scroll-snap-type: x mandatory; /* Efeito de snap */
        height: 300px;             /* Altura fixa pro celular */
        gap: 10px;
    }

    .galeria-item {
        min-width: 90%;           /* Cada foto ocupa 90% da tela */
        height: 100%;
        scroll-snap-align: center; /* Centraliza ao parar */
        
        /* Reseta posições do Grid do PC */
        grid-column: auto !important; 
        grid-row: auto !important;
    }

    /* 3. Sidebar vai para baixo ou fica estática */
    .detalhes-sidebar {
        order: -1; /* Joga o PREÇO para cima da descrição (opcional, se quiser embaixo tire essa linha) */
        width: 100%;
    }
    .sidebar-card {
        position: static; /* Remove o sticky */
        padding: 20px;
    }
    
    /* 4. Ícones menores */
    .features-box { justify-content: flex-start; gap: 15px; }
    .feat-item { min-width: 45%; border-right: 1px solid #333; }
    .feat-item:nth-child(even) { border-right: none; }
}

/* Atualização para Ícones Phosphor */
.feat-icon { 
    font-size: 32px; /* Tamanho maior e mais visível */
    color: var(--accent); /* Amarelo */
    margin-bottom: 8px; 
    font-weight: normal; /* Deixa o traço elegante, não negrito */
}

/* Ajuste no título da seção para alinhar ícone com texto */
.bloco-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtitulo i {
    color: var(--accent);
    margin-right: 5px;
}