
/*Contenedor de categorias*/

input[type="radio"]{
    display: none;
}

.container-category{
    width: 100%;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

.container-category label{
    padding: 5px 15px;
    margin: 5px;
    font-size: 20px;
    background: #e2e2e2;
    border-radius: 5px;
    cursor: pointer;
}

.container-category label:hover{
    opacity: 0.8;
}



/*Post - Publicaciones*/

.container-post{
    max-width: 1200px;
    margin: auto;
}

.posts{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;

    margin-top: 20px;
    padding: 20px;
}

.posts .post{
    background: rgb(241, 241, 241);
    box-shadow: 0 0 20px -20px black;
    border-radius: 6px;
    overflow: hidden;
    padding-bottom: 20px;
}

.post .ctn-img{
    width: 100%;
    height: 150px;
}

.post .ctn-img img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post h2{
    font-size: 18px;
    margin-top: 20px;
    padding: 0px 20px;
}

.post span{
    display: block;
    margin-top: 10px;
    padding: 0px 20px;
}

.ctn-tag{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin-left: 16px;
    margin-top: 10px;
}

.ctn-tag li{
    list-style: none;
    font-size: 14px;
    margin: 4px;
    padding: 6px 10px;
    background: #e8e8e8;
    cursor: default;
}


.post button{
    margin-top: 20px;
    margin-left: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background: #46a2fd;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.post button:hover{
    opacity: 0.9;
}


/*sistema de filtrado*/

[value="TODOS"]:checked ~ .posts .post[data-category]{
    display: block;
}

[value="PROGRAMACIÓN"]:checked ~ .posts .post:not([data-category~="PROGRAMACIÓN"]),
[value="HERRAMIENTAS"]:checked ~ .posts .post:not([data-category~="HERRAMIENTAS"]),
[value="DISEÑOS"]:checked ~ .posts .post:not([data-category~="DISEÑOS"]),
[value="LETRAS"]:checked ~ .posts .post:not([data-category~="LETRAS"]),
[value="MATEMÁTICAS"]:checked ~ .posts .post:not([data-category~="MATEMÁTICAS"]),
[value="IDIOMAS"]:checked ~ .posts .post:not([data-category~="IDIOMAS"]),
[value="OTROS"]:checked ~ .posts .post:not([data-category~="OTROS"]){
    display: none;
}

[value="TODOS"]:checked ~ .container-category [for="TODOS"],
[value="PROGRAMACIÓN"]:checked ~ .container-category [for="PROGRAMACIÓN"],
[value="HERRAMIENTAS"]:checked ~ .container-category [for="HERRAMIENTAS"],
[value="DISEÑOS"]:checked ~ .container-category [for="DISEÑOS"],
[value="LETRAS"]:checked ~ .container-category [for="LETRAS"],
[value="MATEMÁTICAS"]:checked ~ .container-category [for="MATEMÁTICAS"],
[value="IDIOMAS"]:checked ~ .container-category [for="IDIOMAS"],
[value="OTROS"]:checked ~ .container-category [for="OTROS"]{
    background: #46a2fd;
    color: #fff;
}

@media screen and (max-width: 1200px){
    .posts{
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 900px){
    .posts{
        grid-template-columns: repeat(2, 1fr);
    }
    .container-category label{
        font-size: 15px;
    }
}

@media screen and (max-width: 580px){
    .posts{
        grid-template-columns: repeat(1, 1fr);
    }
   
}
@media screen and (max-width: 380px){
    .container-category label{
        font-size: 13px;
        padding:5px 10px;
        margin: 4px;
    }
   
}