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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 0.95rem;
    opacity: 0.95;
}

nav {
    background-color: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

nav a {
    color: #667eea;
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #764ba2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-section h2 {
    margin-bottom: 1rem;
    color: #667eea;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-form input,
.search-form select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.search-form button {
    background: #667eea;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #764ba2;
}

.imoveis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.imovel-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.imovel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.imovel-imagem {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    overflow: hidden;
}

.imovel-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imovel-info {
    padding: 1.5rem;
}

.imovel-titulo {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.imovel-preco {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.imovel-tipo {
    display: inline-block;
    background: #e8eaf6;
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.imovel-detalhes {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.imovel-detalhes span {
    margin-right: 1rem;
}

.imovel-link {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
    margin-top: 0.75rem;
}

.imovel-link:hover {
    background: #764ba2;
}

.imovel-detalhe-page {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.imovel-detalhe-page .imovel-imagem {
    height: 400px;
    margin-bottom: 2rem;
}

.imovel-detalhe-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.imovel-descricao h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.imovel-descricao p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.imovel-caracteristicas {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.imovel-caracteristicas h3 {
    color: #333;
    margin-bottom: 0.75rem;
}

.imovel-caracteristicas ul {
    list-style: none;
    padding-left: 0;
}

.imovel-caracteristicas li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.imovel-caracteristicas li:last-child {
    border-bottom: none;
}

.sidebar {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.sidebar h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.sidebar p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.contato-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.contato-form h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group button {
    background: #667eea;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.3s;
}

.form-group button:hover {
    background: #764ba2;
}

footer {
    background: #333;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
}

.erro, .sucesso {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.erro {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.sucesso {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
    }

    .imoveis-grid {
        grid-template-columns: 1fr;
    }

    .imovel-detalhe-grid {
        grid-template-columns: 1fr;
    }

    nav a {
        display: block;
        margin-bottom: 0.5rem;
    }
}
