/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(82, 60%, 28%);
  --title-color: hsl(0, 0%, 15%);
  --text-color: hsl(0, 0%, 35%);
  --body-color: hsl(0, 0%, 14.5%);
  --container-blogue-color: hsl(0, 0%, 100%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --h2-font-size: 1.25rem;
  --small-font-size: .813rem;
  --medium-font-size: 1rem;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1120px) {
  :root {
    --h2-font-size: 1.5rem;
  }
}

/*========== BASE ==========*/
body {
  font-family: var(--body-font);
  background-color: var(--body-color);
  color: var(--text-color);
}

#blogue {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    width: 100%;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.1)), url('/assets/img/blogue/bg2.jpeg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* ======== CARD ======== */
.container-blogue {
    display: grid;
    place-items: center;
    margin-inline: 1.5rem;
    flex: 1;
}

.card-container-blogue {
    display: grid;
    row-gap: 2.5rem;
}

.card-article-blogue {
    position: relative;
}

.card-img-blogue {
    width: 328px;
    border-radius: 1.5rem;
}

.card-img-blogue.data-center {
    height: 220px;
}

.card-data-blogue {
    position: absolute;
    background-color: var(--container-blogue-color);
    padding: 1rem 2rem;
    box-shadow: 0px 8px 24px hsla(0, 0%, 0%, .15);
    border-radius: 1rem;
    bottom: -6rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    transition: opacity 1s 1s;
    margin-top: -3rem;
    cursor: pointer;
}

.card-button-blogue {
    text-decoration: none;
    font-size: var(--small-font-size);
    font-weight: 500;
    color: var(--first-color);
}

.card-button-blogue:hover {
    text-decoration: underline;
}

/*========== Footer ==========*/
.space-footer {
  max-width: 50px;
}

/*========== Card animation ==========*/
@media screen and (max-width: 340px) {
    .container-blogue {
        margin-inline: 1rem;
    }

    .card-data-blogue {
        width: 250px;
        padding: 1rem;
    }
}

@media screen and (max-width: 768px) {
    .card-container-blogue {
    padding-block: 10rem;
    }
}

@media screen and (min-width: 768px) {
    .card-container-blogue {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1.5rem;
    }
}

@media screen and (min-width: 1139px) {
    .card-container-blogue {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 1139px) {
    .card-img-blogue.data-gerador {
        width: 361px;
    } 
}

@media screen and (max-width: 1599px) {
    .card-data-blogue {
        position: absolute;
        width: 280px;
        padding-inline: 2.5rem;
    }

    .card-article-blogue {
        position: relative;
        overflow: hidden;
    }

    .card-img-blogue {
        width: 348px;
    }

    .card-img-blogue.data-cabeamento {
        width: 349px;
    }

    .card-img-blogue.data-center {
        height: 233px;
    }

    .card-img-blogue.data-infra {
        height: 233px;
    }

    .card-tittle-blogue {
        font-size: var(--h2-font-size);
        font-weight: 500;
        color: var(--title-color);
        margin-bottom: 1rem;
        text-align: center;
    }

    .card-description-blogue {
        display: block;
        font-size: var(--small-font-size);
        margin-bottom: .25rem;
        margin-top: 1.5rem;
    }

    /*========== Naming animations in hover ==========*/
    .card-article-blogue:hover .card-data-blogue {
        animation: show-data 1s forwards;
        opacity: 1;
        transition: opacity .3s;
    }

    .card-article-blogue:hover {
        animation: remove-overflow 2s forwards;
    }

    .card-article-blogue:not(:hover) {
        animation: show-overflow 2s forwards;
    }

    .card-article-blogue:not(:hover) .card-data-blogue{
        animation: remove-data 1s forwards;
    }

    /*========== Card animation ==========*/
    @keyframes show-data {
        50% {
            transform: translateY(-7rem);
        }
        100% {
            transform: translateY(-4rem);
        }
    }

    @keyframes remove-overflow {
        to {
            overflow: initial;
        }
    }

    @keyframes remove-data {
        0% {
            transform: translateY(-4rem);
        }

        50% {
            transform: translateY(-7rem);
        }

        100% {
            transform: translateY(.01rem);
        }
    }

    @keyframes show-overflow {
        0% {
            overflow: initial;
            pointer-events: none;
        }
        
        50% {
            overflow: hidden;
        }
    }
}

@media screen and (min-width: 1600px) {
    .card-container-blogue {
        grid-template-columns: repeat(4, 1fr);
    }

    .card-data-blogue {
        width: 302px;
        height: 170px;
        padding-inline: 2.5rem;
    }

    .card-tittle-blogue {
        font-size: var(--h2-font-size);
        font-weight: 500;
        color: var(--title-color);
        text-align: center;
    }

    .card-description-blogue {
        display: block;
        font-size: var(--medium-font-size);
    }

    .card-button-blogue {
        position: absolute;
        bottom: .3rem; /* Ajuste conforme necessário */
        width: max-content; /* Para evitar que o botão fique esticado */
        /* left: 50%; */
        /* padding-left: 80px; */
        /* transform: translateX(-50%); */
    }
}