/**
 * Sistema Imobiliário - Estilos Principais
 * Design Minimalista e Responsivo
 * 
 * @package Sistema Imobiliário
 * @author Grupo ERP Conect
 * @version 1.0.0
 */

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 10px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== BANNER TOPO ===== */
#banner-topo {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    position: relative;
    background: var(--primary);
}

#banner-topo a {
    display: block;
    width: 100%;
    height: 100%;
}

#banner-imagem {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

#banner-topo:hover #banner-imagem {
    transform: scale(1.02);
}

/* ===== HEADER ===== */
header {
    background: var(--primary);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.logo-container {
    flex-shrink: 0;
}

.logo {
    max-height: 60px;
    width: auto;
    display: block;
}

/* ===== NAVEGAÇÃO ===== */
.nav-principal {
    display: flex;
    align-items: center;
}

.nav-principal ul {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav-principal ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: var(--transition);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-principal ul li a:hover,
.nav-principal ul li a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.nav-principal ul li a i {
    font-size: 16px;
}

/* ===== BOTÃO WHATSAPP ===== */
.btn-whatsapp {
    background: #25d366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.4);
    flex-shrink: 0;
}

.btn-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
}

.btn-whatsapp i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== MENU MOBILE ===== */
.menu-mobile {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: var(--transition);
}

.menu-mobile:hover {
    color: var(--secondary);
}

.menu-mobile.active i {
    transform: rotate(90deg);
}

/* ===== SEÇÕES ===== */
.section {
    padding: 60px 0;
}

.section:nth-child(even) {
    background: var(--white);
}

.section:nth-child(odd) {
    background: #f8f9fa;
}

.section h1,
.section h2 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 700;
}

.section .subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 40px;
    font-size: 18px;
}

/* ===== HOME ===== */
#home {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

#home h1 {
    color: white;
    font-size: 42px;
    margin-bottom: 15px;
}

#home p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.destaques {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.2);
}

.card i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.card h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.card p {
    opacity: 0.8;
    font-size: 14px;
    margin: 0;
}

/* ===== IMÓVEIS ===== */
.grid-imoveis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.card-imovel {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card-imovel:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.card-imovel img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-imovel .info-imovel {
    padding: 20px;
}

.card-imovel .info-imovel h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary);
}

.card-imovel .info-imovel .endereco {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.card-imovel .info-imovel .endereco i {
    margin-right: 5px;
}

.card-imovel .info-imovel .preco {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 15px;
}

.card-imovel .info-imovel .preco small {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray);
}

.btn-detalhes {
    display: inline-block;
    padding: 10px 20px;
    background: var(--secondary);
    color: white;
    border-radius: 5px;
    transition: var(--transition);
    font-size: 14px;
}

.btn-detalhes:hover {
    background: var(--primary);
    color: white;
}

/* ===== SERVIÇOS ===== */
.grid-servicos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.servico-item {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.servico-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.servico-item i {
    font-size: 40px;
    color: var(--secondary);
    margin-bottom: 15px;
    display: block;
}

.servico-item h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

.servico-item p {
    color: var(--gray);
    font-size: 14px;
    margin: 0;
}

/* ===== SOBRE ===== */
#sobre p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 18px;
    color: var(--gray);
}

.mapa-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

#mapa {
    height: 400px;
    width: 100%;
}

/* ===== CONTATO ===== */
.contato-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.info-item {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.info-item i {
    font-size: 36px;
    color: var(--secondary);
    margin-bottom: 10px;
    display: block;
}

.info-item p {
    margin: 0;
    color: var(--gray);
}

/* ===== RODAPÉ ===== */
footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
}

footer .container p {
    margin: 5px 0;
    font-size: 14px;
}

footer a {
    color: var(--secondary);
    transition: var(--transition);
}

footer a:hover {
    color: white;
}

/* ===== MODAL WHATSAPP ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-content::-webkit-scrollbar {
    width: 5px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

.modal-content .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
}

.modal-content .close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content h2 i {
    color: #25d366;
}

/* ===== FORMULÁRIO WHATSAPP ===== */
#formWhatsApp .form-group {
    margin-bottom: 15px;
}

#formWhatsApp label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--primary);
    font-size: 14px;
}

#formWhatsApp label .required {
    color: var(--danger);
    margin-left: 2px;
}

#formWhatsApp input,
#formWhatsApp select,
#formWhatsApp textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

#formWhatsApp input:focus,
#formWhatsApp select:focus,
#formWhatsApp textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#formWhatsApp input.error,
#formWhatsApp select.error,
#formWhatsApp textarea.error {
    border-color: var(--danger);
}

#formWhatsApp input.success,
#formWhatsApp select.success,
#formWhatsApp textarea.success {
    border-color: var(--success);
}

#formWhatsApp textarea {
    resize: vertical;
    min-height: 80px;
}

#formWhatsApp .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-enviar {
    width: 100%;
    padding: 14px;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-enviar:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

.btn-enviar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-enviar i {
    font-size: 20px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 992px) {
    .nav-principal ul {
        gap: 3px;
    }
    
    .nav-principal ul li a {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .nav-principal ul li a i {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .menu-mobile {
        display: block;
    }
    
    .nav-principal {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .nav-principal.open {
        display: block;
    }
    
    .nav-principal ul {
        flex-direction: column;
        padding: 10px 0;
        gap: 2px;
    }
    
    .nav-principal ul li a {
        padding: 10px 15px;
        border-radius: 0;
    }
    
    .btn-whatsapp {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .logo {
        max-height: 50px;
    }
    
    #home h1 {
        font-size: 28px;
    }
    
    #home p {
        font-size: 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .destaques,
    .grid-servicos {
        grid-template-columns: 1fr;
    }
    
    .grid-imoveis {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .modal-content {
        padding: 20px;
        width: 98%;
    }
    
    #formWhatsApp .form-row {
        grid-template-columns: 1fr;
    }
    
    .contato-info {
        grid-template-columns: 1fr;
    }
    
    #mapa {
        height: 300px;
    }
}

@media (max-width: 480px) {
    #banner-topo {
        max-height: 150px;
    }
    
    #banner-imagem {
        max-height: 150px;
    }
    
    .logo {
        max-height: 40px;
    }
    
    #home h1 {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card i {
        font-size: 36px;
    }
    
    .grid-imoveis {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .btn-enviar {
        font-size: 14px;
        padding: 12px;
    }
}

/* ===== UTILITÁRIOS ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.hidden { display: none !important; }

/* ===== LOADING ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 280px;
    max-width: 400px;
    animation: slideRight 0.3s ease;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--secondary); }

.toast .toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast .toast-content i {
    font-size: 20px;
}

.toast-success .toast-content i { color: var(--success); }
.toast-error .toast-content i { color: var(--danger); }
.toast-warning .toast-content i { color: var(--warning); }
.toast-info .toast-content i { color: var(--secondary); }

.toast .toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.toast .toast-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
}