* {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Tipografia fluida */
h1 {
    font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem);
}

p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Navegação (mobile) */
nav ul {
    display: flex;
    gap: .75rem;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
}

a {
    text-decoration: none;
}

/* para telas < 768px */
@media (max-width: 48rem) {
    nav ul {
        justify-content: center;
        overflow: visible;
    }

    .header {
        display: flex;
        flex-direction: column;
        position: relative;
        z-index: 1;
        overflow: hidden;
    }

    .header img {
        width: 80%;
        max-width: 15rem;
        height: auto;
        margin: 0 auto;
        position: relative;
        z-index: 1;
        overflow: hidden;
        aspect-ratio: 16/9;
    }

    .header-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        background-color: #401000;
    }

    .header-menu {
        color: #ffffff;
        font-size: 1.3rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .header-menu a,
    .header-menu a:visited,
    .header-menu a:hover,
    .header-menu a:active {
        color: inherit;
    }

    .main-servicos-intro h1,
    .main-servicos-tipos h2 {
        font-size: 2rem;
        margin-top: 0;
        margin-bottom: 1rem;
        text-align: center;
    }

    .main-servicos-intro p,
    .main-servicos-tipos p {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        text-align: left;
    }

    .main-servicos-intro {
        width: 100%;
        padding: 0 10%;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .main-servicos-tipos {
        background-color: #ffeacc;
        width: 100%;
        padding: 0 10%;
        padding-top: 2rem;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }

    .main-servicos-lista {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .main-servicos-lista> :nth-child(even) {
        background-color: #ffeacc;
        /* Cor de fundo para itens pares */
    }

    .main-servicos-lista {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .main-servicos-lista li {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        /* Alterado para 3 linhas */
        padding: 0 5%;
        padding-top: 1rem;
        padding-bottom: 1rem;
        border-radius: 8px;
        align-items: center;
        gap: 0 1rem;
    }

    .main-servicos-lista li h3 {
        font-size: 1.3rem;
        margin: 0.5rem 0 0 0;
        text-align: center;
        grid-column: 1 / span 2;
    }

    .main-servicos-lista li img {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        height: 80%;
        object-fit: cover;
        border-radius: 12px;
    }

    .main-servicos-lista button {
        grid-column: 1 / span 2;
        grid-row: 3;
        justify-self: center;
        padding: 0.5rem 1rem;
        margin-bottom: 1rem;
        margin-top: 0.5rem;
        font-size: 1rem;
        color: #fff;
        background-color: #401000;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .footer {
        position: relative;
        background-color: #401000;
        color: #ffffff;
        text-align: center;
        padding: 2rem 1.5rem 1rem 1.5rem;
    }

    .footer-pedido {
        position: absolute;
        left: 50%;
        transform: translate(-50%, -145%);
        padding: 1rem 1rem;
        gap: 3rem;
        background-color: #FACE7F;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0;
        border-radius: 0.3rem;
        z-index: 2;
    }

    .footer-contato {
        display: flex;
        flex-direction: column;
        align-items: start;
    }

    .footer-contato p {
        margin: 0.2rem 0;
        font-size: 0.8rem;
    }

    .footer-contato h2,
    .footer-redes h2 {
        font-size: 1.2rem;
        margin: 0.3rem 0;
    }

    .footer-direitos {
        font-size: 0.7rem;
        margin-top: 2rem;
    }

    .footer-section {
        display: flex;
        justify-content: space-around;
    }

    .footer-redes {
        display: grid;
        grid-template-columns: repeat(2, auto);
        grid-template-rows: auto auto auto;
        gap: 0.3rem 1rem;
        justify-items: center;
        align-items: center;
    }

    .footer-redes h2 {
        grid-column: 1 / -1;
        margin: 0.3rem 0;
        font-size: 1.2rem;
        justify-self: center;
    }

    .footer-redes .bi {
        font-size: 1.3rem;
        margin: 0;
    }

    .footer-redes a,
    .footer-redes a:visited,
    .footer-redes a:hover {
        color: #ffffff;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: #fff;
    padding: 0rem 1rem 1rem 1rem;
    margin: 0 10%;
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.6rem;
    right: 1rem;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
}

#modalTitulo {
    padding: 1rem 0 1rem 0;
    margin: 0;
}

.modal-content img {
    max-width: 100%;
    margin-bottom: 10px;
    border-radius: 6px;
}

body.modal-aberto {
    position: fixed;
    width: 100%;
    overflow: hidden;
}