:root{
    --page-bg: #0B090D;
    --page-bg-secondary: #1b78d6;
    --page-bg-secondary-hover: #48D1CC00;
    --grid-gap: .75rem;
    --grid-margin: 1.5rem;
    --text-color: white;
    --text-size: .75rem;

    --h1-size: 1.75rem;
    --h2-size: 1.5rem;
    --h3-size: 1.25rem;

    --button-padding-y: 1rem;
    --button-padding-x: 2.25rem;
    --button-font-size: 1rem;

    --section-distance-top: 4.5rem;
    --subSection-distance-gap: 3.75rem;

    --nav-height: 13.75rem;
}

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

body{
    font-family: 'Inter', sans-serif; 
    font-optical-sizing: auto; /* melhora a legibilidade em tamanhos de fontes diferentes */
    font-weight: 400;
    font-style: normal;
    background: var(--page-bg) linear-gradient(to bottom, var(--page-bg-secondary) 30%, #48D1CC00 60%) fixed;
    color: var(--text-color);
}

a{
    text-decoration: none;
    color: inherit;
}

img{
    max-width: 100%;
}

.container{
    /* margin: 0 var(--grid-gap); */
    margin-left: var(--grid-margin);
    margin-right: var(--grid-margin);
}

.logoIcon{
    /* background-color: var(--page-bg-secondary); */
    position: sticky;
    top: 0;
    width: 100%;
    left: 0;
    display: flex;
    justify-content: space-between;
    padding: 1.75rem;
    background-image: linear-gradient(to bottom, var(--page-bg-secondary) 80%, #48cec900);
}

.logoIcon__logo{
    width: 4.75rem;
    cursor: pointer;
    img{
        max-width: 100%;
    }
}

.nav-menu{
    ul{
        list-style-type: none;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: end;
    }

    a{
        padding: 0.75rem;
        display: inline-block;
        border-bottom: 1px solid transparent;
        font-weight: 700;
        font-size: var(--text-size);
        text-transform: uppercase;

        &:hover{
            border-bottom: 3px solid #135291;
        }
    }
}

.nav-menu ul li:hover{
    transform: translateY(-8px);
}

.nav-menu.menu-closed{
    display: none;
}

h1{
    font-size: var(--h1-size);
    font-weight: 900;
    line-height: 1;
    text-wrap: balance;
}

.hero{
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
}

.hero__title--upper{
    text-transform: uppercase;
    /* color: transparent;
    -webkit-text-stroke: 2px var(--text-color);  */
    text-shadow: 2px 2px var(--text-color), -2px -2px var(--text-color), -1px 2px var(--text-color), 2px -2px var(--text-color);
    display: inline-block;
    color: #063352;
    display: block;
}

.news__whatsapp,
.news__Linkedin,
.news__gmail,
.news__instagram{
    width: 2.5rem;
    transition: 0.3s;

    &:hover{
        transform: translateY(-10px);
    }
}

.btn{
    display: inline-block;
    padding: var(--button-padding-y) var(--button-padding-x);
    border-radius: 10rem;
    background-color: #04335f;
    font-weight: 600;
    font-size: var(--button-font-size);
}

.btn:hover{
    background-color: #506da1;
    color: white;
}

main >*{
    margin-top: var(--section-distance-top);
}

.h2{
    text-align: center;
    font-weight: 900;
    font-size: var(--h2-size);
}

.title--thin{
    font-weight: 400;
    font-style: italic;
    display: block;
}

.courses,
.courses__list{
    display: flex;
    flex-direction: column;
    gap: var(--subSection-distance-gap);
}

.courses__card{
    text-align: center;
}

.courses__card__img{
    width: 11rem;
    /* max-width: 100%; */
    margin-top: 1.25rem;
}

.technologies__carousel__wrapper img{
    max-width: 10rem;
}

.h3{
    font-size: var(--h3-size);
    font-weight: 900;
    text-align: center;
    margin-top: 0;
}

p{
    font-size: var(--text-size);
}

.btn--stroke{
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.courses__card__content{
    margin-top: 1.5rem;

    img{
        max-width: 60%;
    }

    .title--thin{
        margin-top: 1rem;
        margin-bottom: .5rem;
    }
}

.courses__card__ctas{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap:.5rem;
}

.technologies{
    display: flex;
    flex-direction: column;
    gap: var(--subSection-distance-gap);
    margin-top: 5rem;
}

.technologies__carousel__wrapper{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: scroll;
    padding-bottom: 1rem;
    padding-right: var(--grid-gap);

    scroll-snap-type: x mandatory;

    img{
        margin-left: var(--grid-gap);
        width: calc(100% - var(--grid-margin) * 2);
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: calc(100% - var(--grid-margin) * 2); 
        scroll-snap-align: center;
        border-radius: 10%;

        &:last-child{
            margin-left: var(--grid-margin);
        }

        &:first-child{
            margin-left: var(--grid-margin);
        }
    }
}

main{
  /* Firefox */
  * {
    scrollbar-width: auto;
    scrollbar-color: var(--page-bg-secondary) transparent;
  }

  /* Chrome, Edge, and Safari */
  *::-webkit-scrollbar {
    height: 1.25rem;
  }

  *::-webkit-scrollbar-track {
    background: transparent;
  }

  *::-webkit-scrollbar-thumb {
    background-color: var(--page-bg-secondary);
    /* border-radius: 10px;
    border: 3px solid transparent; */
  }
}

.projetos{
    margin-top: 5rem;
}

.projects__list{
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--subSection-distance-gap);
    margin-top: 1rem;
}

.projects__card{
    text-align: center;
    /* padding: 2rem; */
    border-radius: 12px;
    transition: 0.3s;
    margin-top: 2rem;
}

.projects__card:hover{
    transform: translateY(-5px);
}

.pagination{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination button{
    width: 2.8125rem;
    height: 2.8125rem;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);

    background: transparent;
    color: white;

    font-size: 1.2rem;
    cursor: pointer;

    transition: all .25s ease;
}

.pagination button:hover{
    background: white;
    color: black;
    transform: translateY(1rem);
}

.projects__card__content{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.projects__card__ctas{
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: center;
}

.btn--nodeploy{
    color: var(--page-bg-secondary);
    border: none;
    /* background-color: transparent; */
}

.faleComigo{
    background-color: var(--page-bg-secondary);
    background-position: center;
    background-size: cover;
    padding: var(--grid-margin) 0;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: stretch;
} 

.faleComigo h2{
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.404);
}

.faleComigo__content{
    display: flex;
    justify-content: center;
    gap: var(--grid-gap);
    margin-top: var(--grid-gap); 
}

.news__seta{
    display: none;
}

.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.aboutMe__wrapper{
    display: flex;
    flex-wrap: nowrap;
    /* overflow-x: scroll; */
    padding-bottom: 1rem;
    padding-right: var(--grid-gap);
    /* scroll-snap-type: x mandatory; */
    margin: 0;

}

.aboutMe__cards{
    margin-left: var(--grid-gap);
    /* width: calc(100% - var(--grid-margin) * 2); */
    /* flex-grow: 0; */
    /* flex-shrink: 0; */
    /* flex-basis: calc(100% - var(--grid-margin) * 2); */
    /* scroll-snap-align: center; */
    display: flex;
    flex-direction: column;
    align-items: center;

    img{
        max-width: 20%;
        margin-top: 1rem;
    }
}  

.aboutMe__cards__content{
    text-align: center;
    margin-top: 1rem;
    width: 70%;
    
    .h3{
        font-weight: 500;
    }
}

aboutMe__cards__content p{
    font-size: var(--text-size);
}

.footer{
    background-color: #070608;
    text-align: center;
    padding-top: var(--section-distance-top);
    margin-top: var(--section-distance-top);    
    padding-bottom: var(--section-distance-top);

    .container{
        display: flex;
        flex-direction: column;
        gap: var(--grid-margin);
        align-items: center;
    }

    p{
        font-size: 1rem;
    }
}

.footer__logo{
    max-width: 8.5rem;
}

.sm-hide{
    display: none;
}

.projects__card__img{
    width: 9.375rem;
    margin: 0 auto;
    display: block;
}

section{
    scroll-margin-top: var(--nav-height);
}

.formacao__card__content{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    img{
        margin-top: 1.5rem;
    }

    .h3{
        font-size: var(--h3-size);
    }
}

@media screen and (width > 64em){
    :root{
        --h1-size: 3.25rem;
        --h2-size: 2.25rem;
        --h3-size: 1.75rem;
        --button-font-size: 1.25rem;
        --grid-gap: 1.25rem;
        --grid-margin: 2rem;
        --text-size: 1rem;
    }

    body{
        background: var(--page-bg) linear-gradient(to bottom, var(--page-bg-secondary) 30%, #48D1CC00 60%) no-repeat;
        background-size: 100% 100vh;
    }

    .md-hide{
        display: none;
    }

    .md-show{
        display: revert;
    }

    .header{
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        padding-top: 1.375rem;
        padding-bottom: 3.375rem;
        background-image: linear-gradient(to bottom, #1b78d6fa, #1b78d6e7 70%, #48cec900);
        z-index: 3;
    }

    .logoIcon__logo{
        width: 8rem;
        margin: auto;
    }

    .nav-menu{
        margin-top: 1.75rem;
    }

    .hero{
        gap: 4.5rem;
    }

    .nav-menu{
        ul{
            flex-direction: row;
            justify-content: center;
        }
    }

    .hero__cta{
        position: relative;
        left: .5rem;

        &::before{
            content: "";
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 4rem;
            height: 5rem;
            background-image: url(../images/target.png);
            background-size: 100%;
            background-repeat: no-repeat;
            transform: translate(-40%, -10%);
        }
    }

    .courses__title{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--grid-gap);
        &::before,
        &::after{
            content: "";
            width: 12.5rem;
            height: 3.875rem;
            display: inline-block;

            background-image: url(../images/estrelas.png);
            background-size: 100%;
            background-repeat: no-repeat;
        }

        &::after{
            transform: scale(-1, 1);
        }
    }

    .courses{
        gap: calc(var(--subSection-distance-gap) * 1.5);
    }

    .courses__card{
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        gap: var(--grid-gap);
        text-align: left;
    }

    .courses__card__img{
        /* width: 20%; */
        grid-column: 1 / 3;
        width: 95%;
        margin-top: var(--grid-margin);
    }

    .courses__card__content{
        grid-column: 3 / -1;

        .h3{
            text-align: inherit;
        }
    }
    
    .courses__card__ctas{
        flex-direction: row;
        justify-content: end;
    }

    .technologies__carousel__wrapper img{
        flex: auto;
    }

    .technologies__carousel{
        position: relative;

        &::after,
        &::before{
            content:"";
            position: absolute;
            top: 0;
            bottom: 1rem;
            width: 9rem;
            pointer-events: none; 
        }

        &::before{
            left: 0;
            background-image: linear-gradient(to right, var(--page-bg) var(--grid-margin), #0000);
        }

        &::after{
            right: 0;
        }
    }

    .projects__list{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (width > 90em){
    :root{
        --grid-margin: 4rem;
        --h1-size: 4rem;
        --h2-size: 2.5rem;
        --h3-size: 2rem;

        --section-distance-top: 9rem;
        --subsection-distance-gap: 7.75rem;
    }

    .courses__card__img{
        width: 100%;
        grid-column: 3/3;
        margin-top: var(--grid-gap);
    }

    .header{
        padding: 3rem 0;
    }

    .header .container{
        display: flex;
        justify-content: space-between;
    }

    .nav-menu{
        margin: 0;
    }

    .logoIcon__logo{
        width: 8rem;
        margin: 0;
    }

    .courses__card{
        grid-template-columns: repeat(12, 1fr);
    }

    .courses__card__content{
        grid-column: 4/-3;
    }

    .technologies__carousel{
        max-width: 85%; 
        justify-content: center;
        display: flex;
        margin: 0 auto;
        /* outer container will clip the scrolling inner wrapper */
        overflow: hidden;
    }

    .technologies__carousel__wrapper{
        /* max-width: 30%; */
        overflow: hidden;
        gap: .5em;
        img{
            margin: 0;
        }
    }

    .projects__list{
        grid-template-columns: repeat(3, 1fr);
        max-width: 75rem;    
        margin: 2rem auto;
    }

    .footer p{
        font-size: 1.5rem;
    }

    .hero{
        display: grid;
        grid-template-columns: repeat(12, 1fr);

        &>*{
            grid-column: 2/-2;
        }
    }

    .aboutMe__cards img{
        max-width: 10%;
    }

    .aboutMe__cards__content{
        width: 50%;
    }

    @keyframes scrollLoop{
        from{ transform: translateX(0); }
        to{ transform: translateX(calc((var(--w) + var(--grid-gap)) * var(--qtd) * -1)); }
    }

    .js-enabled.technologies__carousel__wrapper{
        --w: 26.25em;
        display: flex;
        width: max-content;
        /* allow the wrapper to expand beyond any previous max-width so cloned items are visible */
        max-width: none;
        overflow: visible;
        align-items: center;
        margin: 0 auto;
        gap: .5em;
        will-change: transform;
        /* animation is set dynamically in JS to better match item widths */
    }
}
