/* ==========================================================================
   VARIÁVEIS E ESTILOS GLOBAIS
   ========================================================================== */

 :root {
    --cor-primaria: #1a365d;
    --cor-secundaria: #2b6cb0;
    --cor-fundo: #f7fafc;
    --cor-texto: #2d3748;
    --cor-suave: #718096;
    --cor-card: #ffffff;
    --borda-raio: 8px;
    --sombra: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 50px 0;
}


/* ==========================================================================
   ESTILOS DO HEADER PÚBLICO E LOGO
   ========================================================================== */

.site-header {
    background: #ffffff;
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cor-primaria);
    text-decoration: none;
}

.site-logo img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    font-weight: 600;
    color: var(--cor-texto);
    text-decoration: none;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--cor-secundaria);
}


/* ==========================================================================
   HERO BANNER E FILTRO DE BUSCA
   ========================================================================== */

.hero-banner {
    background: linear-gradient(rgba(27, 54, 93, 0.85), rgba(13, 27, 46, 0.85)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    padding: 80px 20px;
    color: #ffffff;
    text-align: center;
}

.hero-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-banner p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.search-box {
    background: #ffffff;
    padding: 25px;
    border-radius: var(--borda-raio);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: var(--cor-texto);
    max-width: 900px;
    margin: 0 auto;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}


/* ==========================================================================
   CARDS DE IMÓVEIS E SEÇÕES PÚBLICAS
   ========================================================================== */

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--cor-primaria);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.property-card {
    background: var(--cor-card);
    border-radius: var(--borda-raio);
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-thumb {
    position: relative;
    height: 200px;
}

.property-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.property-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.property-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cor-secundaria);
    margin: 10px 0;
}

.property-specs {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--cor-suave);
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: auto;
}


/* ==========================================================================
   FORMULÁRIOS E BOTÕES
   ========================================================================== */

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--cor-secundaria);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.25);
}

textarea.form-control {
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: var(--cor-primaria);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--cor-secundaria);
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-weight: 500;
}

.alert-success {
    background-color: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-danger {
    background-color: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}


/* ==========================================================================
   GALERIA DE FOTOS E MODAL
   ========================================================================== */

.imovel-galeria-foto {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.imovel-galeria-foto:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.modal-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-lightbox.active {
    display: flex;
}

.modal-conteudo-imagem {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    animation: zoomIn 0.25s ease;
}

.modal-fechar {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.modal-fechar:hover {
    color: #e53e3e;
}

@keyframes zoomIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* ==========================================================================
   BOTÃO FLUTUANTE DO WHATSAPP
   ========================================================================== */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50px;
    text-align: center;
    font-size: 32px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background-color 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
    color: #ffffff;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}


/* ==========================================================================
   RODAPÉ
   ========================================================================== */

.site-footer {
    background-color: #0d1b2e;
    color: #a0aec0;
    padding: 50px 0 20px 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid #1a2e48;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}


/* Links do Rodapé */

.site-footer a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #cbd5e0;
    text-decoration: underline;
}


/* ==========================================================================
   REGRAS DE RESPONSIVIDADE (CELULARES E TABLETS - ATÉ 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Empilha o Logo e a Navegação no Header */
    .header-container {
        flex-direction: column;
        padding: 12px 15px;
        gap: 12px;
        text-align: center;
    }
    .site-logo {
        justify-content: center;
        font-size: 1.2rem;
    }
    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 15px;
    }
    .main-nav a {
        font-size: 0.95rem;
    }
    /* Reduz tamanhos de texto no Banner */
    .hero-banner {
        padding: 45px 15px;
    }
    .hero-banner h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    .hero-banner p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    /* Ajusta a caixa de filtro para 1 coluna */
    .search-box {
        padding: 15px;
        width: 100%;
    }
    .search-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    /* Ajusta grid dos cards */
    .cards-grid {
        grid-template-columns: 1fr;
    }
    /* Ajuste do botão do WhatsApp */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 26px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}