/* --------------------------
   Estilos gerais do body
--------------------------*/
body {
    margin: 0;
    padding: 0;
    font-family: "Barriecito", system-ui;
    font-style: normal;
}

/* -----------------------
   Header e Navegação
-------------------------- */
#Idiomas {
    position: relative;
}

#Idiomas a {
    color: black;
    padding: 5px;
    margin-left: 5px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    font-size: 15px;
    position: absolute;
    z-index: 1;
}

#Idiomas a[href="index.html"] {
    left: 10px;
    top: 5px;
}

#Idiomas a[href="portefolio_en.html"] {
    left: 50px;
    top: 5px;
}

#Idiomas a:hover {
    color: white;
    font-weight: 700;
    background-color: black;
}

nav {
    background-color: #FEF9E1;
    background: rgba(255, 255, 255, 0.25);
    text-align: center;
    position: fixed;
    width: 100%;
    padding: 5px;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 45px;
}

nav a {
    color: black;
    text-transform: uppercase;
    margin: 5px;
    text-decoration: none;
    font-weight: 450;
    font-size: 16px;
}

nav a:hover {
    color: #92451C;
    font-weight: 600;
}

/*------------------------------------
Aplicação de animação por JavaScript
---------------------------------------*/
nav a.active {
    border-bottom: 2px solid #92451C;
    font-weight: bold;
    color: #92451C;
}

/* -----------------------
   Secção: Página Inicial
-------------------------- */
#PaginaInicial {
    background-color: #FEF9E1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url("/files/imagem_fundo.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    font-weight: 600;
    margin-bottom: 0;

    display: flex;
    justify-content: space-between;
}

h1 {
    margin-top: 0;
    font-size: 120px;
    font-weight: 100;
    padding-top: 70px;
    margin-left: 65px;
}

#PaginaInicial h2 {
    justify-content: flex-end;
    align-self: flex-end;
    font-size: 60px;
    font-weight: 300;
    margin-right: 10px;
}

/* -----------------------
   Secção: Sobre Mim
-------------------------- */
#SobreMim {
    background-color: #92451C;
    height: 90vh;
    color: #ffffff;
    font-weight: 100;
    margin-bottom: 0;
    padding-bottom: 0;
}

#SobreMim h2 {
    color: #ffffff;
    font-weight: 300;
    font-size: 50px;
    text-align: center;
    padding-top: 50px;
    margin-top: 0;
}

#SobreMim p {
    padding: 65px;
    font-weight: 400;
    font-size: 25px;
}

.Sobre {
    display: flex;
    font-size: 25px;
    text-align: justify;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 5px;
}

#SobreMim img {
    border-radius: 35px;
    margin-top: 45px;
    margin-right: 55px;
    width: 300px;
    max-width: 100%;
    height: auto;
}

/* --------------------------------------
   Secção: Experiência Profissional
----------------------------------------- */
#ExperienciaProfissional {
    background-color: #FEF9E1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url("/files/fundo_exp.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    height: 80vh;
    color: #6B4C3B;
    margin-top: 0;
    padding-top: 0;
}

#ExperienciaProfissional h2 {
    font-size: 50px;
    text-align: center;
    font-weight: 300;
    padding-top: 50px;
    margin-top: 0;
}

.empresas {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

.card {
    width: 230px;
    height: 230px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.card:hover .card-inner,
.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-front img {
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

.card-back {
    background-color: #92451C;
    color: white;
    transform: rotateY(180deg);
    text-align: center;
    font-size: 20px;
    padding: 15px;
}

.botao {
    text-align: center;
    background-color: #92451C;
    border-radius: 40px;
    cursor: pointer;
    color: #ffffff;
    text-transform: uppercase;
    border: none;
    font-size: 15px;
    padding: 15px;
    width: 10%;
    display: block;
    margin: 0 auto;
    margin-top: 50px;
    text-decoration: none;
}

.botao:hover {
    color: white;
    padding: 18px;

}

/* ----------------------------
   Secção: Formacao Acadêmica
------------------------------- */
#FormacaoAcademica {
    background-color: #E5D0AC;
    color: #6B4C3B;
    height: 40vh;
}

#FormacaoAcademica h2 {
    font-size: 50px;
    text-align: center;
    font-weight: 300;
    padding-top: 50px;
    margin-top: 0;
}

#FormacaoAcademica p {
    font-size: 20px;
    font-weight: 400;
    padding-left: 50px;
}

/* --------------------
   Secção: Projetos
----------------------- */
#Projetos {
    background-color: #FEF9E1;
    color: #6B4C3B;
    text-align: center;
    min-height: 100vh;
}

#Projetos h2 {
    font-size: 50px;
    font-weight: 300;
    padding-top: 50px;
    margin-top: 0;
    text-align: center;
}

.ContainerProjetos {
    display: grid;
    place-items: center;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.projeto {
    max-width: 250px;
    text-align: center;
}

.projeto h3 {
    font-size: 20px;
    font-weight: 400;
    color: #5a2e14;
    margin-top: 0;
}

.projeto img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    margin-bottom: 0;
}

.projeto p {
    font-size: 18px;
    font-style: italic;
    color: #5a2e14;
    margin-top: 10px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.SITES {
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 0;
    margin-top: 0;
}

.site {
    background-color: #92451C;
    cursor: pointer;
    color: #E5D0AC;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    padding: 8px 10px;
    text-decoration: none;
    margin: 8px 3px 5px 3px;
}

.site:hover {
    color: #E5D0AC;
    font-weight: 700;
}

/* ----------------------
   Secção: Habilidades
------------------------- */
#Habilidades {
    background-color: #E5D0AC;
    color: #6B4C3B;
    height: 45vh;
    text-align: center;
}

#Habilidades h2 {
    font-size: 50px;
    font-weight: 300;
    padding-top: 50px;
    margin-top: 0;
}

#Habilidades p {
    font-size: 18px;
    font-weight: 400;
}

/* --------------------------
   Secção: Contactos
-------------------------- */
#Contactos {
    background-color: #92451C;
    color: #ffffff;
    height: 65vh;
    text-align: center;
    padding-bottom: 0;
}

#Contactos h2 {
    text-transform: uppercase;
    font-size: 50px;
    font-weight: 300;
    padding-top: 50px;
    padding-bottom: 0px;
    margin-top: 0;
    text-align: center;
}

.Colunas {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding-top: 0;
    margin-top: 0;
}

.ColunaEsquerda {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0;
    margin-top: 0;
    gap: 35px;
}

.ColunaDireita {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.telefone,
.whatsapp,
.email,
.linkedin,
.link-linkedin {
    display: flex;
    font-size: 18px;
    font-weight: 300;
    flex-direction: row;
    justify-content: baseline;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
}

.whatsapp:hover {
    text-decoration: underline;
    color: white;
    font-weight: 400;
}

.link-linkedin:hover {
    text-decoration: underline;
    color: white;
    font-weight: 400;
}

.foto_redonda {
    width: 160px;
    height: 160px;
    perspective: 1000px;
}

.foto_redonda-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.foto_redonda:hover .foto_redonda-inner,
.foto_redonda.flipped .foto_redonda-inner {
    transform: rotateY(180deg);
}

.foto_redonda-front,
.foto_redonda-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.foto_redonda-back {
    transform: rotateY(180deg);
}

.foto_redonda-front img,
.foto_redonda-back img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.open {
    background-color: #FEF9E1;
    border-radius: 40px;
    cursor: pointer;
    color: #92451C;
    border: none;
    font-size: 15px;
    font-weight: 600;
    padding: 20px;
    text-decoration: none;
}

.open:hover {
    color: #92451C;
    font-weight: 700;
}

/* --------------------------
   Footer
-------------------------- */
footer {
    background-color: #E5D0AC;
    color: #6B4C3B;
    text-align: center;
    margin-top: 0;
    padding: 5px;
    height: 5vh;
}

footer p {
    font-weight: 600;
    font-size: 15px;
    margin-top: 0;
    padding-top: 10px;
}


/* ----------------------------------------------------
   Ajustes de Responsividade (para telas menores)
   ---------------------------------------------------- */

@media (max-width: 1024px) {

    /* Navegação */
    nav {
        display: none;
    }

    /* Página inicial */
    #PaginaInicial {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 40px 20px;
        background-size: cover;
        background-position: center;
    }

    h1 {
        font-size: 45px;
        margin: 10px 0;
    }

    #PaginaInicial h2 {
        font-size: 25px;
        margin: 10px 0;
        align-items: center;
    }

    /* Sobre Mim */
    #SobreMim {
        height: auto;
        padding: 20px;
    }

    .Sobre {
        flex-wrap: wrap;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #SobreMim img {
        width: 250px;
        margin: 20px 0;
    }

    #SobreMim p {
        font-size: 18px;
        padding: 20px;
    }

    /* Experiência Profissional */
    #ExperienciaProfissional {
        height: auto;
        padding: 30px 10px;
        background-size: cover;
        background-position: center;
    }

    .empresas {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .card {
        width: 180px;
        height: 180px;
    }

    .card-back {
        font-size: 16px;
        width: 140px;
        height: 140px;
    }

    .botao {
        width: auto;
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Formação Acadêmica */
    #FormacaoAcademica {
        height: auto;
        padding: 20px;
    }

    #FormacaoAcademica h2 {
        font-size: 30px;
    }

    #FormacaoAcademica p {
        font-size: 16px;
        padding: 10px;
    }

    /* Projetos */
    #Projetos {
        padding: 20px;
    }

    #Projetos h2 {
        font-size: 30px;
    }

    .ContainerProjetos {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .projeto {
        max-width: 200px;
    }

    .projeto h3 {
        font-size: 16px;
    }

    .projeto p {
        font-size: 14px;
    }

    /* Habilidades */
    #Habilidades {
        height: auto;
        padding: 20px;
    }

    #Habilidades h2 {
        font-size: 30px;
    }

    #Habilidades p {
        font-size: 16px;
    }

    /* Contactos */
    #Contactos {
        height: auto;
        padding: 30px 10px;
    }

    #Contactos h2 {
        font-size: 30px;
    }

    .Colunas {
        flex-wrap: wrap;
        flex-direction: column;
        gap: 20px;
    }

    .ColunaEsquerda,
    .ColunaDireita {
        align-items: center;
    }

    .telefone,
    .whatsapp,
    .email,
    .linkedin,
    .link-linkedin {
        font-size: 16px;
    }

    .foto_redonda {
        width: 120px;
        height: 120px;
    }

    /* Footer */
    footer {
        height: auto;
        padding: 10px;
    }

    footer p {
        font-size: 12px;
    }
}