:root {
    --primary-color: rgba(52, 152, 219, 0);
    --hover-color: rgba(52, 152, 219, 0.3);
}

/* Aplica Montserrat como padrão global */
body { 
    font-family: 'Montserrat', sans-serif; 
    background: #f4f4f4; 
    margin: 0;
    padding: 0;
    color: #333; /* Uma cor levemente mais suave para leitura */
}

/* Garante que títulos e elementos do Bootstrap também usem a fonte */
h1, h2, h3, h4, h5, h6, .navbar-brand, .nav-link, button {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.5px; /* Montserrat fica muito bem com um leve ajuste de espaçamento */
}

/* Ajuste específico para os pesos da Montserrat */
.fw-bold { font-weight: 700 !important; }
.display-4 { font-weight: 800; }
.nav-link { font-weight: 600; }

.bg-geral{
    background: #f4f4f4; 
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* BLOCOS PRINCIPAIS: Força empilhamento vertical */
nav, header, main, footer {
    display: block;
    width: 100%;
    clear: both;
}

/* CONTAINER DA PLANTA */
#planta .container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0;
    background: #fff;
    overflow: hidden;
}

.planta-img {
    width: 100%;
    height: auto;
    display: block;
}

.overlay-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ÁREAS DOS APARTAMENTOS */
.apto-area {
    fill: var(--primary-color);
    stroke: rgba(41, 128, 185, 0.2);
    stroke-width: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apto-area:hover {
    fill: var(--hover-color);
}

.apto-area.selected {
    fill: rgba(13, 110, 253, 0.4) !important;
    stroke: #0d6efd !important;
    stroke-width: 2px;
}

/* TOOLTIP (BALÃO AO PASSAR MOUSE) */
#tooltip {
    position: fixed;
    display: none;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    pointer-events: auto;
    z-index: 9999;
    width: 260px;
}

#tooltip img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* MODAL E LAYOUT DE DETALHES */
#modalBody { 
    min-height: 250px; 
    max-height: 75vh; 
    overflow-y: auto; 
    overflow-x: hidden;
}
/* Nova classe exclusiva para centralizar o ícone de carregamento */
.loader-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 250px;
}

.cursor-pointer {
    cursor: pointer;
}


/*
.main-img-container {
    height: 500px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

*/

/* Aumenta a altura para mostrar mais da imagem original */
.main-img-container {
    width: 100%;
    max-height: 500px !important; /* Aumentamos a altura consideravelmente */
    background: #000; /* Fundo preto caso a imagem seja de proporção diferente */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in; /* Cursor de lupa para indicar que é clicável */
}

/* Ajusta a imagem para caber inteira sem cortes */
.main-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Garante que a imagem inteira apareça sem ser cortada */
    transition: transform 0.3s ease;
}

.main-img-container:hover img {
    transform: scale(1.02); /* Leve efeito de zoom no hover */
}

.zoom-img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-img-container:hover .zoom-img {
    transform: scale(1.02);
}

@media (min-width: 992px) {
    .modal-xl {
        max-width: 90%;
    }
}

/* BOX DE INFORMAÇÕES NO MODAL */
.info-box-detalhes {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-item-linha {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.info-item-linha:last-child { border-bottom: none; }

/* TOUR 360 E LOADING */
.skeleton-360 {
    width: 100%;
    height: 600px;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0; left: 0;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#panorama {
    position: relative;
    background: #000;
    min-height: 600px;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#panorama iframe {
    opacity: 0;
    transition: opacity 0.8s ease;
}

#panorama iframe.loaded { opacity: 1; }

/* WHATSAPP E ANIMAÇÕES */
.pulse-whatsapp { animation: pulse 2s infinite; }

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.fade-in { animation: fadeIn 0.5s ease-in; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
    #tooltip {
        width: 90% !important;
        left: 5% !important;
        bottom: 20px !important;
        top: auto !important;
        position: fixed;
    }

    .main-img-container { height: 300px; }

    /* Scroll na planta mobile */
    #planta .container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .planta-img, .overlay-svg { min-width: 800px; }
}

/* Bolinha de status da cota */
.dot-cota {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Ajuste para o texto das cotas não quebrar em telas menores */
.resumo-cotas span {
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Layout de colunas para o mapa */
.row.g-2 {
    max-height: 250px; /* Evita que o modal fique excessivamente longo */
    overflow-y: auto;
    padding-right: 5px;
}

/* Estilo para as abas de Blocos */
#pills-tab-blocos .nav-link {
    color: #666;
    border-radius: 0;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

#pills-tab-blocos .nav-link.active {
    background-color: transparent !important;
    color: #0d6efd !important;
    border-bottom: 3px solid #0d6efd;
}

/* Estilo para as abas de Andares */
#pills-tab-andares {
    border-bottom: none;
}

#pills-tab-andares .nav-link {
    color: #555;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    margin: 0 2px;
}

#pills-tab-andares .nav-link.active {
    background-color: #fff;
    border-bottom-color: transparent;
    font-weight: bold;
}

/* Efeito de transição suave na imagem */
#imagemPlanta {
    transition: opacity 0.3s ease-in-out;
}



/* Remove paddings do corpo do modal 360 para o iframe encostar nas bordas */
#modal360 .modal-body {
    padding: 0 !important;
}

/* Força os dois modais XL a terem exatamente a mesma largura máxima */
@media (min-width: 992px) {
    #aptoModal .modal-xl, 
    #modal360 .modal-xl {
        max-width: 90% !important; 
        margin-left: auto;
        margin-right: auto;
    }
}

/* Ajuste para o iframe não ultrapassar o limite do container */
#iframe360 {
    display: block;
    width: 100%;
    border: none;
}

/* 1. Reset do Modal para evitar barra dupla e cortes */
#aptoModal.modal, 
#modal360.modal {
    overflow: hidden !important; /* Impede a barra de rolagem externa do navegador */
}

/* 2. Garante que o diálogo fique centralizado e não estoure a tela */
#aptoModal .modal-dialog, 
#modal360 .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
    margin-top: auto;
    margin-bottom: auto;
}

/* 3. Ajuste do Conteúdo: Define uma altura máxima para o modal não sumir no rodapé */
#aptoModal .modal-content {
    max-height: 95vh; /* O modal ocupará no máximo 95% da altura da tela */
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

/* 1. Remove a rolagem dupla e garante que o modal não "vaze" */
#aptoModal.modal {
    overflow-y: hidden !important;
}

/* 2. Força o conteúdo a respeitar o cabeçalho */
#aptoModal .modal-body {
    padding: 0 !important; /* Deixamos o padding para as classes do Bootstrap no JS */
    max-height: 75vh;     /* Limita a altura para 75% da tela */
    overflow-y: auto;     /* Cria o scroll apenas aqui dentro */
    overflow-x: hidden;
}

/* 3. Esconde a barra de rolagem mas mantém a função (o scroll invisível que você pediu) */
#aptoModal .modal-body::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}
#aptoModal .modal-body {
    scrollbar-width: none; /* Firefox */
}

/* ========================================= */
/* ESTILOS DO LOADER GLOBAL                  */
/* ========================================= */
.loading-overlay-hidden {
    display: none !important;
}

#loadingOverlayGlobal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); /* Fundo escuro transparente */
    backdrop-filter: blur(4px); /* Borrão chique no fundo */
    z-index: 99999; /* Fica por cima de absolutamente TUDO (modais, menus) */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    font-family: sans-serif;
}

/* Efeito de Spinner girando (Opcional, mas fica profissa) */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Garante que o SweetAlert fique acima dos modais normais (1055), 
   mas respeite os modais críticos de sistema como o Timeout (9999) */
.swal2-container {
    z-index: 9990 !important;
}

/* Garante que o Swal de Timeout sobreponha absolutamente tudo no universo */
.swal-timeout-supremo {
    z-index: 2147483647 !important; 
}

.cor-cabecalho-visitante {
    background-color: #5a12cc; /* Um azul marinho bem elegante */
    color: #ffffff;
}

.cor-cabecalho-atendimento {
    background-color: #5a12cc; /* Um roxo forte para o Liner */
    color: #ffffff;
}

.cor-body-visitante {
    background-color: #cdaeff; /* Um azul marinho bem elegante */
    color: #000;
}

.cor-body-atendimento {
    background-color: #cdaeff; /* Um roxo forte para o Liner */
    color: #000;
}