/*------------------------------------
  サイドバーの左側
-------------------------------------*/
main.haveSidebar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  width: 95%;
  max-width: 1400px;
  margin: 7.5rem auto 0;
}

main.haveSidebar > article,
main.haveSidebar  > #postsFiled {
  width: calc(100% - (240px + 3rem ));
}

#postsFiled > h3 span.resultTitle {
  padding: 0 0.5rem;
  margin-right: 0.5rem;
  white-space: initial;
  border-bottom: 3px solid var(--Pink);  
}

#postsFiled > h3 + ul#postsList {
  margin-top: 3rem;
}

#postsFiled ul#postsList li.post {
  width: calc((100% - 1.5rem * 2) / 3);
}

#postsFiled ul#postsList li.post:not(:nth-of-type(3n + 1)) {
  margin-left: 1.5rem;
}

#postsFiled ul#postsList li.post:nth-of-type(n + 4) {
  margin-top: 1.5rem;
}


@media screen and (max-width: 1024px) {
  main.haveSidebar > article,
  main.haveSidebar  > #postsFiled {
    width: calc(100% - (240px + 2rem ));
  }

  #postsFiled ul#postsList li.post {
    width: calc((100% - 1.5rem) / 2);
  }
  
  #postsFiled ul#postsList li.post:not(:nth-of-type(3n + 1)) {
    margin-left: 0;
  }

  #postsFiled ul#postsList li.post:not(:nth-of-type(2n + 1)) {
    margin-left: 1.5rem;
  }

  #postsFiled ul#postsList li.post:nth-of-type(n + 3) {
    margin-top: 1.5rem;
  }
}


@media screen and (max-width: 799px) {
  main.haveSidebar {
    flex-direction: column;
  }

  main.haveSidebar > article,
  main.haveSidebar  > #postsFiled {
    width: 90%;
    margin: 0 auto;
  }
}


@media screen and (max-width: 599px) {
  main.haveSidebar > article,
  main.haveSidebar  > #postsFiled {
    width: 95%;
  }

  #postsFiled > h2 + ul#postsList {
    margin-top: 2rem;
  }

  #postsFiled ul#postsList li.post {
    width: 100%;
  }

  #postsFiled ul#postsList li.post:not(:nth-of-type(2n + 1)) {
    margin-left: 0;
  }

  #postsFiled ul#postsList li.post:nth-of-type(n + 2) {
    margin-top: 1.5rem;
  }
}



/*------------------------------------
  サイドバー
-------------------------------------*/
#sidebar {
  width: 240px;
  margin-top: 4rem;
}

.sidebarFiled {
  position: relative;
  width: 100%;
  border: 1px solid var(--Pink);
}

.sidebarFiled + 
.sidebarFiled {
  margin-top: 1.5rem;
  border-radius: 1rem;
}

.sidebarTitle {
  position: relative;
  top: -1px;
  width: 100%;
  padding: 0.5rem 0;
  color: var(--White);
  text-align: center;
  background: var(--Pink);
  border-radius: 1rem 1rem 0 0;
}

.sidebarTitle i span {
  margin-left: 0.5rem;
}

.sidebarItemBox {
  padding: 1.2rem;
}


@media screen and (max-width: 799px) {
  #sidebar {
    width: 80%;
    max-width: 400px;
    min-width: 240px;
    margin-top: 4rem;
    margin-right: auto;
    margin-left: auto;
  }
}




/*------------------------------------
  検索バー
-------------------------------------*/
#searchContents {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

#searchField {
  width: 100%;
  margin: 4px 6px;
  line-height: 2;
}

#searchSubmit {
  height: 100%;
  margin-right: 0.75rem;
  font-size: 1.5rem;
  line-height: 2rem;
  background: none;
  cursor: pointer;
  transition: opacity 0.3s ease-in-out;
}

#searchSubmit:hover {
  opacity: 0.6;
}




/*------------------------------------
  カテゴリー
-------------------------------------*/
#categoryBox li::before {
  content: "\f105";
  margin-right: 0.5rem;
  font-family: "Font Awesome 6 Free";
  font-weight: 700;
  color: var(--Pink);
}






/*------------------------------------
  新着記事
-------------------------------------*/
#newpostsFiled .sidebarTitle i {
  transform: scaleX(-1);
}

#newpostsBox .categoryAndDate small {
  font-size: 10px;
}

#newpostsBox .categoryAndDate small i {
  margin-right: 6px;
}

#newpostsBox li.post + li.post {
  margin-top: 1.5rem;
}

#newpostsBox li.post h5.postTitle {
  font-size: 18px;
  font-weight: normal;
}

