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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f2f2;
}

.cabecalho {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #7e3e1c;
}

.cabecalho-link {
    color: #fff;
    text-decoration: none;
}

h1 {
    color: #fff;
    font-size: 24px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

h2 {
    margin-bottom: 20px;
}

section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.cartao {
    width: 260px;
    height: 320px;
    perspective: 1000px;
}

.cartao-interno {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.cartao:hover .cartao-interno {
    transform: rotateY(180deg);
}

.cartao-frente,
.cartao-verso {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    backface-visibility: hidden;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

.cartao-verso {
    transform: rotateY(180deg);
}

.cartao-imagem {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.cartao-frente p,
.cartao-verso p {
    padding: 15px;
    text-align: center;
    font-size: 15px;
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;
}

footer {
    background-color: #7e3e1c;
    padding: 15px 25px;
    color: #fff;
    text-align: center;
}
