/* RESET RULES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:root {
  --black: #3a3a3a;
  --white: #fff;
  --green: #49b293;
}

* {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  /* max-width: 100%; */
  height: auto;
}

ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

.author-archive {
  padding: 1.5rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
}

h1 a {
  transition: all 0.1s;
}

h1 a:hover {
  background: var(--green);
  color: var(--white);
}

input[type="radio"] {
  position: absolute;
  left: -9999px;
}

/* FILTERS
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.filters {
  text-align: center;
  margin-bottom: 2rem;
}

.filters label {
  padding: 0.5rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: 2rem;
  min-width: 50px;
  line-height: normal;
  cursor: pointer;
  transition: all 0.1s;
}

.filters label:hover {
  background: var(--green);
  color: var(--white);
}

/* FILTERED ELEMENTS (POSTS)
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.posts {
  width: 100%;
  display: grid;
  grid-gap: 1.5rem;
  grid-template-columns: 25% 25% 25% 25%;
  /* flex-direction: row; */
  justify-content: center;
  align-items: center;
  align-content: center;
  /* flex-wrap: wrap; */
  padding: 2%;
}

.posts .post {
  /* min-height: 100px; */
  background: #ffffff;
  box-shadow: 0 0 0 1px #c4c4c4;
  transition: 0.3s;
  /* width: 100%; */
}
.posts .post:hover {
  box-shadow: 0 0 50px rgb(0 0 0 / 15%);
}

.posts .post-title {
  font-size: 0.9rem;
}

.posts .post-title:hover {
  text-decoration: underline;
}

.posts figcaption {
  padding: 1rem;
}

.posts .post-categories {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
}

.posts .post-categories * {
  display: inline-block;
}

.posts .post-categories li {
  margin-bottom: 0.2rem;
}

.posts .post-categories a {
  pointer-events: none;
  cursor: default;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  border: 1px solid;
  line-height: normal;
  transition: all 0.1s;
}

.posts .post-categories a:hover {
  background: var(--green);
  color: var(--white);
}

/* FILTERING RULES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
[value="All"]:checked ~ .filters [for="All"],
[value="CSS"]:checked ~ .filters [for="CSS"],
[value="JavaScript"]:checked ~ .filters [for="JavaScript"],
[value="jQuery"]:checked ~ .filters [for="jQuery"],
[value="WordPress"]:checked ~ .filters [for="WordPress"],
[value="Slider"]:checked ~ .filters [for="Slider"],
[value="fullPage.js"]:checked ~ .filters [for="fullPage.js"],
[value="Erectile"]:checked ~ .filters [for="Erectile"] {
  background: var(--green);
  color: var(--white);
}

[value="All"]:checked ~ .posts [data-category] {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

[value="CSS"]:checked ~ .posts .post:not([data-category~="CSS"]),
[value="JavaScript"]:checked ~ .posts .post:not([data-category~="JavaScript"]),
[value="jQuery"]:checked ~ .posts .post:not([data-category~="jQuery"]),
[value="WordPress"]:checked ~ .posts .post:not([data-category~="WordPress"]),
[value="Slider"]:checked ~ .posts .post:not([data-category~="Slider"]),
[value="fullPage.js"]:checked
  ~ .posts
  .post:not([data-category~="fullPage.js"]),
[value="Erectile"]:checked ~ .posts .post:not([data-category~="Erectile"]) {
  display: none;
}

/* FOOTER
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/* footer {
  font-size: 1rem;
  padding: 0 1.5rem;
  text-align: right;
} */

/* MQ
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media screen and (max-width: 900px) {
  .posts {
    grid-template-columns: repeat(2, 50%);
  }
}

@media screen and (max-width: 650px) {
  html {
    font-size: 14px;
  }

  .posts {
    grid-template-columns: 100%;
  }
}

@media screen and (min-width: 750px) {
  .filters * {
    display: inline-block;
  }
}
