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

body {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.6;
    font-size: 1.2rem;
    background-color: #252525;
}

main{
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
}

main h1{
    color: #D2AE6D;
}

p{
    color: #D2AE6D;
}

.cabecalho{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

#btn-mobile{
    display: none;
}

.logo1{
    height: 60px;
}

.navbar ul{
    list-style: none;
    display: flex;
    gap: 30px;
}

.navbar a{
    text-decoration: none;
    color:#D2AE6D;
    font-weight: 500;
    transition: 0.3s;
}

.navbar a:hover{
    color: #a88952;
}

.button-nav{
    background: #755724;
    padding: 10px 18px;
    border-radius: 5px;
}

.button-nav:hover{
    background: #4d3a1a;
    color: #252525;
}

.hero {
    text-align: center;
    padding: 20px;
    position: relative;
    overflow: hidden; 
    z-index: 1; 
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%; 
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: linear-gradient(rgba(37, 37, 37, 0.85), rgba(37, 37, 37, 0.85)), url('imagens/background.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1; 
    transition: transform 1.5s ease-out; 
    will-change: transform; 
}

.hero:hover::before {
    transform: scale(1.1);
}

.hero h1 {
    font-size: 3rem; 
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); 
    letter-spacing: 1px;
    margin: 0;
    color: #D2AE6D;
}

.hero p {
    font-size: 1.25rem;
    line-height: 1.8; 
    max-width: 850px; 
    margin: 0;
}

.servicos{
    margin-top: 10px;
    text-align: center;
}

.servicos h2{
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #D2AE6D;
}

.card-servico h3{
    margin-top: 0;
    text-shadow: 0 0 0 12px black;
}

.servicos p{
    color: #252525;
    margin-top: auto;
}

.servicos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.card-servico:hover {
    transform: translateY(-10px);
    transition: 0.3s;
}

.card-servico {
    min-height: 380px; 
    display: flex;
    flex-direction: column;
    padding: 30px;
    text-align: center;
}

.card-servico h3 {
    margin-top: 10px;
    color: #D2AE6D;
}

.card-servico p {
    margin-top: auto;
    margin-bottom: 30px; 
    color: #D2AE6D;
}

.card-servico.civil {
    background-image: linear-gradient(rgba(37, 37, 37, 0.75), rgba(37, 37, 37, 0.75)), url('imagens/civil.jpg');
    background-size: cover;
    background-position: center;
}

.card-servico.preventiva {
    background-image: linear-gradient(rgba(37, 37, 37, 0.8), rgba(37, 37, 37, 0.8)), url('imagens/preventiva.jpg');
    background-size: cover;
    background-position: center;
}

.card-servico.familia {
    background-image: linear-gradient(rgba(37, 37, 37, 0.8), rgba(37, 37, 37, 0.8)), url('imagens/familia.jpg');
    background-size: cover;
    background-position: center;
}

.card-servico.previdencia {
    background-image: linear-gradient(rgba(37, 37, 37, 0.8), rgba(37, 37, 37, 0.8)), url('imagens/previdencia.jpg');
    background-size: cover;
    background-position: center;
}

.sobre{
    margin: 80px;
    text-align: center;
    color: #D2AE6D;
}

.sobre h2{
    font-size: 2.5rem;
}

.sobre p{
    max-width: 700px;
    margin: 15px auto;
}

footer{
    margin-top: 80px;
    background: #222;
    color: white;
    text-align: center;
    padding: 30px;
}

.container-principal{
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

#contato, #localizacao{
    flex: 1;
    width: 48%;
    background-color: #D2AE6D;
    padding: 30px;
    border-radius: 10px;
    align-items: stretch;
}

#contato h2{
    text-align: center;
}

#localizacao h2{
    text-align: center;
    padding-bottom: 20px;
}

.campo{
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

input{
    width: 100%;
    padding: 10px;
    border-radius: 5px;
}

textarea{
    resize: vertical;
}

button{
    background-color:#755724;
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

#localizacao iframe{
    width: 100%;
    flex-grow: 1;
    border-radius: 15px;
}

input:focus{
    outline: none;
    transition: all 0.3s ease;
}

textarea:focus{
    outline: none;
    transition: all 0.3s ease;
}

/* --- CORREÇÃO PARA O JAVASCRIPT --- */

@media (max-width: 768px){

    .cabecalho{
        flex-direction: row; /* Mantém logo e botão na mesma linha */
        padding: 20px;
    }

    #btn-mobile{
        display: flex;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #D2AE6D;
        cursor: pointer;
    }

    /* Esconde a lista por padrão no mobile */
    .navbar ul {
        display: none; 
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px;
        left: 0;
        background-color: #755724;
        padding: 20px;
        z-index: 1000;
        gap: 20px;
    }

    /* Mostra a lista APENAS quando o JS adicionar a classe .menu-aberto */
    .navbar.menu-aberto ul {
        display: flex;
    }

    .container-principal{
        flex-direction: column;
    }

    .servicos-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
        
    .card-servico {
        min-height: 280px; 
    }

    #contato, #localizacao{
        width: 100%;
    }

    #localizacao iframe{
        height: 400px;
    }
}