@import url('https://fonts.googleapis.com/css2?family=Bitcount+Grid+Single:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Yarndings+20&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body{
  height: 100%;
}

body{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: lightgray;
}

nav{
  background-color: #575555;
  justify-content: space-around;
  align-items: center;
  display: flex;
}

.logo {
  font-size: 24px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.4vw;
  color: white;
}

nav ul{
  list-style: none;
  background: #575555;
}

nav ul li{
  display: inline-block;
  position: relative;
  letter-spacing: 0.1vw;
}

nav ul li a{
  display: block;
  padding: 1.2vw 2vw;
  color: white;
  text-decoration: none;
  text-align: center;
}

nav ul li .submenu-list{
  width: 100%;
  background: #575555;
  position: absolute;
  z-index: 999;
  display: none;
}

nav ul li .submenu-list li{
  display: block;
}

nav ul li a:hover{
  background-color: #292828;
}

nav ul li:hover .submenu-list{
  display: block;
}

footer{
  width: 100%;
  color: #f5f5f5;
  margin-top: auto;
}

#footer_conteudo{
  background-color: #575555;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 3rem 3.5rem;
}

#footer_contato{
  margin-bottom: 0.75rem;
}

#logo {
  font-size: 24px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.4vw;
  color: white;
}

#footer_social{
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

#footer_social .footer-link{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  color: #f5f5f5;
  border-radius: 50%;
  transition: all 0.4s;
}

.footer-link{
  text-decoration: none;
}

#footer_social .footer-link i{
  font-size: 1.25rem;
}

#footer_social .footer-link:hover{
  opacity: 0.8;
}

#instagram{
  background: linear-gradient(#7f37c9, #ff2992, #ff9807);
}

#footer_copy{
  display: flex;
  justify-content: center;
  background-color: #292828;
  font-size: 0.9rem;
  padding: 0.8rem;
  font-weight: 100;
}

@media screen and (max-width: 768px) {
  #footer_conteudo{
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media screen and (max-width: 426px) {
  #footer_conteudo{
    grid-template-columns: repeat(1, 1fr);
    padding: 3rem 2rem;
  }
}

main {
  background-size: cover;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 0;
  display: flex;
  width: 100%;
  flex: 1;
}

:root {
    --first-color: hsl(82, 60%, 28%);
    --title-color: hsl(0, 0%, 15%);
    --text-color: hsl(0, 0%, 35%);
    --body-color: lightgray;
    --container-color: hsl(0, 0%, 100%);

    --h2-font-size: 1.25rem;
    --small-font-size: .813rem;
}

@media screen and (min-width: 1120px) {
    :root {
        --h2-font-size: 1.6rem;
        --small-font-size: .875rem;
    }
}

img{
    display: block;
    max-width: 100%;
    height: auto;
}

.container{
    display: grid;
    place-items: center;
    margin-inline: 1.5rem;
    padding-block: 2rem;
    width: 100%;
}

.card_container{
    display: grid;
    row-gap: 3.5rem;
}

.card_article{
    position: relative;
    overflow: hidden;
}

.card_img{
    width: 100%;
    max-width: 328px;
    border-radius: 1.5rem;
    margin: 0 auto;
}

.card_info{
    width: 90%;
    max-width: 280px;
    background-color:var(--container-color);
    padding: 1.5rem 1.5rem;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, .15);
    border-radius: 1rem;
    position: absolute;
    bottom: -9rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    opacity: 0;
    transition: opacity 1s 1s;
}

.card_desc{
    display: block;
    font-size: var(--small-font-size);
    margin-bottom: .25rem;
}

.card_title{
    font-size: var(--h2-font-size);
    font-weight: 500;
    color: var(--title-color);
    margin-bottom: .75rem;
}

.card_button{
    text-decoration: none;
    font-size: var(--small-font-size);
    font-weight: 500;
    color: var(--first-color);
}

.card_button:hover{
    text-decoration: underline;
}

.card_article:hover .card_info{
    animation: show-info 1s forwards;
    opacity: 1;
    transition: opacity .3s;
}

.card_article:hover{
    animation: remove-overflow 2s forwards;
}

.card_article:not(:hover){
    animation: show-overflow 2s forwards;
}
.card_article:not(:hover) .card_info{
    animation: remove-data 1s forwards;
}


@keyframes show-info{
    50%{
        transform:translateY(-10rem);
    }
    100%{
        transform: translateY(-7rem);
    }
}

@keyframes remove-overflow {
    to{
        overflow: initial;
    }
}

@keyframes remove-data {
    0%{
        transform: translateY(-7rem);
    }
    50%{
        transform: translateY(-10rem);
    }
    100%{
        transform: translateY(.5rem);
    }
}

@keyframes show-overflow {
    0%{
        overflow: initial;
        pointer-events: none;
    }
    50%{
        overflow: hidden;
    }
}

@media screen and (max-width: 340px) {
    .container{
        margin-inline: 1rem;
    }

    .card_container{
        grid-template-columns: 1fr;
    }

    .card_data{
        width: 250px;
        padding: 1rem;
    }
}

@media screen and (min-width: 768px) {
    .card_container{
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1.5rem;
    }
}

@media screen and (min-width: 1024px) {
    .card_container{
        grid-template-columns: repeat(3, 1fr);
        column-gap: 1.5rem;
    }
    .card_img{
        width: 100%;
        max-width: 300px;
    }
    .card_data{
        width: 90%;
        max-width: 280px;
        padding-inline: 1.5rem;
    }
}

@media screen and (min-width: 1200px) {

    .card_container{
        grid-template-columns: repeat(4, 1fr);
    }
    .card_img{
        width: 100%;
        max-width: 348px;
    }
    .card_data{
        width: 90%;
        max-width: 316px;
        padding-inline: 1.5rem;
    }
}