* {
    margin: 0;
    padding: 0;
    font-family: system-ui;
    box-sizing: border-box;

    --heigth: 270px;
    --width: 480px;
    --radius: 25px;
    --gap: 70px;
}

section[id="slider"] {
    min-height: 100vh;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 50px 0;
}

section[id="slider"] h2 {
    padding-top: 50px;
    font-size: 2em;
    color: #eee;
}

section[id="slider"] .listaVideos {
    margin-top:100px;
    padding-bottom: 50px;
    width: 90%;
    place-items: center;
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(var(--width), 1fr) );
    gap: var(--gap);
}

.ytvideo {
    color: white;
    transition: transform .6s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.flip-card:hover .ytvideo .detras,
.flip-card:hover .ytvideo .detras p,
.flip-card:hover .ytvideo .frontal p
{
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-in-out;
}

.flip-card:hover .ytvideo .detras {
    animation-name: slidein;
}

.flip-card:hover .ytvideo .detras p {
    background: rgba(0,0,0,.6);
    animation-name: subirtexto;
}

.flip-card:hover .ytvideo .frontal p{
    animation-name: slideout;
}

@keyframes slidein{
    from {
        opacity: 0;
    }
    to {
        opacity: 100;
    }
}

@keyframes subirtexto {
    from {
        transform:translateY(-50px);
    }
    to {
        transform:translateY(0px);
    }
}

@keyframes slideout{
    from {
        opacity: 100;
    }
    to {
        opacity: 0;
    }
}
#yt_icon {
    width: 50px;
    height: 50px;
}


.frontal, .detras {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: rotateX(0deg)
}

.ytvideo {
    position: relative;
    width: var(--width);
    height: var(--heigth);
    border-radius: var(--radius);

}

.ytvideo .detras,
.ytvideo .frontal {
    position: absolute;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content:end;
}

.ytvideo .frontal img {
    position: absolute;
    border-radius: var(--radius);
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.ytvideo .frontal p {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255, .4);
    text-align: center;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    width: 100%;
    height: 90px;
    font-weight: 600;
    letter-spacing: .05em;
    font-size: 1.5em;
    padding: 10px 5px;
    text-shadow: 0 0 5px black;
    z-index: 1;
}

.ytvideo .detras {
    position: absolute;
    opacity: 0;
    background: transparent;
    border-radius: var(--radius);
    /* -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    transform: rotateY(180deg); */
}

.ytvideo .detras a img {
    position: absolute;
    top:-50px;
    left: -50px;
    width: 100px;
    height: auto;
    transition: .5s;
}

.ytvideo .detras .linkYT:hover,
.ytvideo .detras a img:hover {
    transition: .5s;
    filter:invert(100%);
}

.ytvideo .detras p {
    font-size: 1.3em;
    font-weight: 400;
    position: relative;
    text-align: center;
    padding: 25px;
    bottom: 70px;
}


.ytvideo .detras a[class="linkYT"] {
    position: absolute;
    font-size: 1.2em;
    bottom: -50px;
    color : #eee;
    background: #222;
    padding: 15px 30px;
    text-decoration: none;
    z-index: 10;
    border: 3px solid white;
    border-radius: var(--radius);
    transition: .5s;
}

.ytvideo .detras .linkYT span {
    display: inline;
    color: rgb(248, 138, 138);
}

@media screen and (max-width: 600px) {
    .flip-card {
        zoom: .5;
    }
}


