/*ESTILOS GENERALES*/

:root{
    --primaryColor: #0dd075;
    --secondaryColor: #0ee4ab;
    --black: #181818;
    --gradientBg: linear-gradient(90deg, var(--primaryColor), var(--secondaryColor));
}

*{
    box-sizing: border-box;
    font-family: sans-serif, Arial, Helvetica;
}
body{
    background: var(--black);
    font-family: sans-serif, Arial, Helvetica;
    text-align: center;
    padding: 0px;
    margin: 0px;
}

.layout{
    width: 100%;
    height: auto;

    display: grid;
    grid-template-areas:
        "header header header header"
        "banner banner banner banner"
        "content content content content"
        "footer footer footer footer"
    ;
    grid-template-rows: 100px 500px auto 200px;
}

.container{
    width: 80%;
    padding: 0 10%;
    display: flex;
    justify-content: center;
    box-sizing: content-box;
}


/*ESTILOS CABECERA*/

.header{
    grid-area: header;
    background: var(--black);
    text-align: left;
    font-style: italic;
}

.logo{
    background: var(--gradientBg);
    width: 50px;
    height: 50px;
    border-radius: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play{
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 5px;
}

.header span{
    margin-left: 15px;
    color: var(--secondaryColor);
    background: var(--gradientBg);
    -webkit-text-fill-color: rgba(0, 0, 0, 0);
    -webkit-background-clip: text;
    font-size: 38px;
    font-weight: 800;
}

.header .container{
    align-items: center;
    height: 100%;
}

/*ESTILOS PARA EL CONTENIDO PRINCIPAL*/

.banner{
    grid-area: banner;
    background-image: url('/media/banner.jpg');
    background-position: center;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 100px;
    justify-content: flex-start;
}
.banner .overlay{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, black, transparent);
    z-index: 0;
}
.banner h1{
    color: white;
    z-index: 1;
    position: inherit;
    text-align: left;
    font-size: 62px;
    margin: 0;
    width: 60%;
}


.contenedor{
    grid-area: content;
    height: auto;

    display: grid;
    grid-template-areas:
        "movies movies movies lateral"
    ;
}

.content{
    grid-area: movies;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-right: 20px;
}

.peli-item{
    background: black;
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.25);
    padding: 30px ;
    color: white;
    display: flex;
    flex-direction: column;
}
.peli-item .title{
    font-size: 26px;
    margin: 0;
    color: var(--secondaryColor);
    background: var(--gradientBg);
    -webkit-text-fill-color: rgba(0, 0, 0, 0);
    -webkit-background-clip: text;
    font-weight: 800;
    line-height: 1;
    text-align: left;
}
.peli-item .description{
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* number of lines to show */
            line-clamp: 4; 
    -webkit-box-orient: vertical;
    color: lightgray;
    text-align: left;
}
.peli-item .buttons{
    margin-top: auto;
    display: flex;
}

button,
input[type="submit"],
input[type="button"]{
    width: 100px;
    background: white;
    color: var(--primaryColor);
    border: 0;
    outline: 0;
    padding:15px;
    border-radius: 3px;
    text-transform: capitalize;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 300ms;
    margin: 15px 5px 0;
    width: 50%;
}

.peli-item .edit:hover{
    color: white;
    background: #ffae52;
}

.peli-item .delete:hover{
    color: white;
    background: #df3232;
}

/*ESTILOS BARRA LATERAL*/

.lateral{
    grid-area: lateral;
    min-width: 300px;
}
.lateral .filters{
    position: sticky;
    top: 50px;
}
.lateral .filters > div{
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto 20px;
    background: var(--gradientBg);
    border-radius: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.25);
    padding: 30px ;
    color: white;
    display: flex;
    flex-direction: column;
}
.lateral > div h3{
    margin: 0;
    font-size: 26px;
    text-align: left;
}
.lateral button{
    margin: 15px 0 0;
    width: 100%;
}

.lateral input[type="text"],
.lateral input[type="text"],
.lateral textarea,
.edit_form input[type="text"],
.edit_form input[type="text"],
.edit_form textarea
{
    display: block;
    margin: 0 auto;
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    background: #f6f7f9;
    color: #454545;
    width: 100%;
    opacity: 4;
    outline: 0;
    border-color: transparent;
}

.edit_form{
    border-top: 1px solid #ddd;
    margin-top: 10px;
}
.successNewMovie, .searchSpan{
    margin-top: 10px;
}

.editMovieForm{
    padding-top: 20px;
}
.editMovieForm h3{
    color: white;
    text-align: left;
}
.editMovieForm input, .editMovieForm textarea{
    display: block;
    margin: 0 auto;
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    background: #f6f7f9;
    color: #454545;
    width: 100%;
    opacity: 4;
    outline: 0;
    border-color: transparent;
}
.editMovieForm button{
    width: 100%;
    margin: 15px 0 0;
}

/*ESTILOS PARA EL PIE DE PÁGINA*/
.footer{
    grid-area: footer;

    background-color: black;
    color: white;
    margin-top: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}


@media (max-width: 1085px){
    .content{
        grid-template-columns: repeat(2, 1fr);
    }
    .lateral {
        min-width: 250px;
    }
}

@media (max-width: 945px){
    .content{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px){
    .contenedor {
        grid-template-areas:
            "lateral"
            "movies";
        padding: 0 10%;
    }
    .content{
        margin-top: 50px;
        padding: 0;
    }
    .banner h1 {
        color: white;
        z-index: 1;
        position: inherit;
        text-align: left;
        font-size: 48px;
        margin: 0;
        width: 100%;
    }
}