:root {
    --negro : #000000;
    --blanco: #ffffff;
    --azul1 : #4CC0E0;
}

/* Seccion de tarjetas del blog */
.seccion-nuevo-blog {
    padding: 6rem 2rem 8rem;
}

.seccion-nuevo-blog h2 {
    text-align: center;
}

@media screen and (max-width: 480px) {
    .seccion-nuevo-blog {
        padding: 6rem 0 8rem;
    }
}

.contenedor-swiper {
    width: 85%;
    padding-top: 2rem;
}

@media screen and (max-width: 350px) {
    .contenedor-swiper {
        width: 90%;
    }
}

.seccion-nuevo-blog .contenedor-tarjeta {
    display: flex;
    row-gap: 3.5rem;
    justify-content: space-evenly;
}

.contenedor-tarjeta .articulo-tarjeta {
    position: relative;
    overflow: hidden;
}

.articulo-tarjeta .tarjeta-img {
    width: 100%;
    border-radius: 1rem;
}

.articulo-tarjeta .tarjeta-info {
    width: 85%;
    background-color: var(--blanco);
    padding: 1.5rem;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.15);
    border-radius: 1rem;
    position: absolute;
    bottom: -5rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    opacity: 0;
    transition: opacity 1s 1s;
}

.tarjeta-info .tarjeta-descripcion {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    line-height: 1rem;
}

.tarjeta-info .tarjeta-titulo {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--negro);
    margin: 1rem 0;
    line-height: 1.6rem;
    text-align: left;
}

.tarjeta-info .tarjeta-boton {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--azul1);
}

.tarjeta-info .tarjeta-boton:hover {
    text-decoration: underline;
}

.articulo-tarjeta:hover .tarjeta-info {
    animation: show-data 1s forwards;
    opacity: 1;
    transition: opacity 0.3s;
}

.articulo-tarjeta:hover {
    animation: remove-overflow 2s forwards;
}

.articulo-tarjeta:not(:hover) {
    animation: show-overflow 2s forwards;
}

.articulo-tarjeta:not(:hover) .tarjeta-info {
    animation: remove-data 1s forwards;
}

/* Animacion de la tarjeta */
@keyframes show-data {
    50% {
        transform: translateY(-10rem);
    }
    
    100% {
        transform: translateY(-7rem);
    }
}

@keyframes remove-overflow {
    to {
        overflow: initial;
    }
}

@keyframes show-overflow {
    0% {
        overflow: initial;
        pointer-events: none;
    }

    50% {
        overflow: hidden;
    }
}

@keyframes remove-data {
    0% {
        transform: translateY(-7rem);
    }

    50% {
        transform: translateY(-10rem);
    }

    100% {
        transform: translateY(0.5rem);
    }
}

@media screen and (max-width: 1560px) {
    .articulo-tarjeta .tarjeta-img {
        height: 250px;
    }
}

@media (max-width: 1170px) {
    .articulo-tarjeta .tarjeta-img {
        height: 250px;
    }
}

@media (max-width: 300px) {
    .articulo-tarjeta .tarjeta-info {
        width: 85%;
        padding: 0.5rem;
    }
}
