/* ==========================================================================
   CONFIGURAÇÕES GERAIS E RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
}

/* ==========================================================================
   ESTRUTURA PRINCIPAL (BACKGROUND ADAPTÁVEL)
   ========================================================================== */
.nossa-historia-section {
    width: 100%;
    min-height: 100vh;
    background-image: url('imagens/background.png'); 
    background-color: #ffeb00; /* Cor reserva de segurança */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   HEADER BANNER (TOPO DO SITE)
   ========================================================================== */
.header-banner {
    background-color: #222222; 
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('imagens/chaves.png'); 
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 14vh; 
    min-height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between; 
    padding: 0 5%;
    z-index: 5;
}

/* Logo Circular Reativo */
.logo-container {
    background: #ffffff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.25);
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -40px; 
    z-index: 10;
    transition: all 0.3s ease;
}

.logo-img {
    max-width: 90%;
    max-height: 90%;
    height: auto;
    object-fit: contain;
}

/* ==========================================================================
   MENU DE NAVEGAÇÃO SUPERIOR (CÁPSULAS)
   ========================================================================== */
.menu-navegacao ul {
    list-style: none;
    display: flex;
    gap: 15px; 
}

.menu-navegacao a {
    color: #ffffff;
    text-decoration: none;
    font-size: calc(13px + 0.2vw);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 24px; 
    border-radius: 50px; 
    background-color: rgba(255, 255, 255, 0.08); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

/* Efeito Hover nos botões do menu */
.menu-navegacao a:hover {
    color: #222222;
    background-color: #ffeb00; 
    border-color: #ffeb00;
    transform: translateY(-2px); 
    box-shadow: 0px 6px 15px rgba(255, 235, 0, 0.3); 
}

/* Estado Ativo do Menu (Página Atual) */
.menu-navegacao a.active {
    background-color: #ffeb00;
    color: #222222;
    border-color: #ffeb00;
    box-shadow: 0px 4px 12px rgba(255, 235, 0, 0.2);
}

/* ==========================================================================
   CARD DE CONTEÚDO CENTRALIZADO (HISTÓRIA E SERVIÇOS)
   ========================================================================== */
.content-container {
    width: 100%;
    flex: 1; 
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 5%;
}

.card-historia {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 680px; 
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

/* Tipografia Fluida dentro do Card */
.card-historia h2 {
    text-align: center;
    color: #2a3182; 
    font-size: calc(22px + 0.5vw); 
    margin-bottom: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.linha-divisoria {
    border: 0;
    height: 2px;
    background: #2a3182;
    margin-bottom: 25px;
    width: 100%;
}

.card-historia p {
    color: #333333;
    font-size: calc(15px + 0.2vw); 
    line-height: 1.6;
    margin-bottom: 18px;
    text-align: justify; 
}

.card-historia h3 {
    color: #2a3182;
    font-size: calc(16px + 0.3vw);
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: bold;
}

/* Lista de Tópicos/Valores */
.lista-valores {
    list-style: none;
}

.lista-valores li {
    font-size: calc(15px + 0.2vw);
    line-height: 1.6;
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
    color: #333333;
}

.lista-valores li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2a3182; 
    font-weight: bold;
    font-size: 18px;
}

/* Bloco de espaçamento extra para a página de serviços */
.servico-bloco {
    width: 100%;
    text-align: left;
}

/* ==========================================================================
   BOTÃO DO WHATSAPP FIXO COM SISTEMA DE BALÃO FLUTUANTE
   ========================================================================== */
.whatsapp-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Botão de Disparo que fica Tremendo */
.btn-whatsapp-trigger {
    background-color: #25d366;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    animation: tremer-whatsapp 3s ease-in-out infinite;
    transition: transform 0.3s ease;
    outline: none;
}

.btn-whatsapp-trigger:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}

.icon-whatsapp {
    width: 35px;
    height: 35px;
}

/* O Balão de Opções Duplas */
.whatsapp-balao {
    background: #ffffff;
    width: 280px;
    border-radius: 12px;
    box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Ativado via JavaScript */
.whatsapp-balao.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.balao-header {
    background-color: #25d366;
    color: #ffffff;
    padding: 12px 16px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
}

.balao-corpo {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-atendente {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    text-decoration: none;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.link-atendente:hover {
    background: #eaffee;
    border-color: #25d366;
}

.avatar-atendente {
    background: #2a3182; 
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.info-atendente {
    display: flex;
    flex-direction: column;
}

.info-atendente strong {
    color: #333333;
    font-size: 14px;
}

.info-atendente span {
    color: #777777;
    font-size: 12px;
}

/* Animação Inteligente de Tremer */
@keyframes tremer-whatsapp {
    0%, 100% { transform: rotate(0deg) scale(1); }
    2% { transform: rotate(15deg) scale(1.05); }
    4% { transform: rotate(-15deg) scale(1.05); }
    6% { transform: rotate(14deg) scale(1.05); }
    8% { transform: rotate(-14deg) scale(1.05); }
    10% { transform: rotate(12deg) scale(1.05); }
    12% { transform: rotate(-12deg) scale(1.05); }
    14% { transform: rotate(0deg) scale(1); }
}

/* ==========================================================================
   MODAL DE ORÇAMENTO INTELIGENTE (FORMULÁRIO FLUTUANTE)
   ========================================================================== */
.modal-orcamento {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; 
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Ativado via JavaScript */
.modal-orcamento.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-conteudo {
    background-color: #ffffff;
    width: 90%;
    max-width: 450px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-orcamento.active .modal-conteudo {
    transform: scale(1);
}

/* Botão Fechar Modal (X) */
.btn-fechar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-fechar-modal:hover {
    color: #333;
}

.modal-conteudo h3 {
    color: #2a3182;
    font-size: 22px;
    margin-bottom: 5px;
}

/* Elementos do Formulário */
.campo-grupo {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    text-align: left;
}

.campo-grupo label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.campo-grupo input, 
.campo-grupo select, 
.campo-grupo textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.campo-grupo input:focus, 
.campo-grupo select:focus, 
.campo-grupo textarea:focus {
    border-color: #2a3182;
    box-shadow: 0 0 5px rgba(42, 49, 130, 0.2);
}

/* Botão Temático de Enviar para o WhatsApp */
.btn-enviar-orcamento {
    background-color: #25d366;
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: background 0.2s;
}

.btn-enviar-orcamento:hover {
    background-color: #20ba5a;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVIDADE E ADAPTAÇÃO PARA CELULAR)
   ========================================================================== */
@media (max-width: 768px) {
    /* Ajustes do Menu e Logo no Celular */
    .header-banner {
        flex-direction: column; 
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    .logo-container {
        width: 110px;
        height: 110px;
        margin-bottom: 0; 
    }
    .menu-navegacao ul {
        gap: 8px;
    }
    .menu-navegacao a {
        font-size: 12px;
        padding: 8px 16px; 
    }
    
    /* Espaçamentos internos menores em telas mobile */
    .content-container {
        padding: 40px 20px 30px 20px;
    }
    .card-historia {
        padding: 25px 20px;
    }
    
    /* Redimensionamento dos elementos flutuantes do WhatsApp */
    .btn-whatsapp-trigger {
        width: 55px;
        height: 55px;
    }
    .icon-whatsapp {
        width: 30px;
        height: 30px;
    }
    .whatsapp-balao {
        width: 250px;
    }
    .whatsapp-container {
        bottom: 20px;
        right: 20px;
    }
    
    /* Ajuste do tamanho do modal em telas pequenas */
    .modal-conteudo {
        padding: 20px;
    }
}