@import url(html5-doctor-reset-stylesheet.min.css);
@import url(http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css);
@import url(base.css);

article {
  background-color: #fdebcf;

  &.is-blog {
    background-color: #e4f4fd;

    .blog {
      background-image: url(../images/bg_blog.png);
    }
  }
}

.blog {
  max-width: 820px;
  width: calc(100% - 60px);
  margin: auto;
  background: url(../images/bg_news.png) left top no-repeat;
  background-size: 284px;

  @media screen and (max-width: 1024px) {
    width: calc(100% - 24px);
  }
}

.blog-header {
  height: 110px;
  padding: 20px;
  position: relative;

  .blog-type {
    position: absolute;
    top: 0;
    left: 0;
    color: #fff;
    font-size: 100px;
    line-height: 1;
  }

  .breadcrumb {
    text-align: center;
    position: relative;

    ul {
      display: inline-flex;
    }

    li {
      &::after {
        content: " ＞ ";
      }

      &:last-child {
        &::after {
          content: unset;
        }
      }
    }
  }
}

.blog-body {
  display: flex;
  justify-content: space-between;
  max-width: 760px;
  margin: auto;
  padding-bottom: 160px;
  line-height: 1.5;

  @media screen and (max-width: 1024px) {
    flex-direction: column;
    row-gap: 4rem;
    padding-bottom: 4rem;
  }

  .body-left {
    flex-basis: 62.5%;

    &:only-child {
      flex-basis: 80%;
      margin-left: auto;
      margin-right: auto;
    }
  }

  .body-right {
    flex-basis: 27%;
  }

  img {
    max-width: 100%;
  }

  h3 {
    font-size: 18px;
    text-align: center;
    margin-bottom: 36px;
  }

  ul {
    display: flex;
    flex-direction: column;
    row-gap: 30px;
  }

  .section-blog-item {
    background-color: #fff;
    height: 150px;
    overflow: hidden;

    > a {
      display: flex;
      color: #221815;
    }
  }

  .section-blog-thumbnail {
    flex-shrink: 0;
    flex-basis: 150px;
    overflow: hidden;
    aspect-ratio: 1;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .section-blog-thumbnail-empty {
      background-color: #ccc;
      aspect-ratio: 1;
      display: block;
    }
  }

  .section-blog-content {
    padding: 1.5em;
  }

  .section-blog-date {
    font-size: 10px;
    display: block;
    margin-bottom: 1em;
  }

  .section-blog-excerpt {
    font-size: 16px;
    line-height: 1.5;
    height: 4.5em;
    overflow: hidden;
    display: block;
    display: -webkit-box;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
}

.monthly-archive {
  dt {
    background-color: #0054a7;
    color: #fff;
    padding: 1em;
    border-radius: 1em 1em 0 0;
    text-align: center;
    margin-bottom: 4px;
  }
  ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  li {
    padding: 1em;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;

    a {
      color: #0054a7;
    }

    span {
      width: 41px;
      height: 35px;
      background: url(../images/archive.svg) center center no-repeat;
      background-size: contain;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 12px;
    }
  }
}

.entry-archive {
  dt {
    background-color: #f08341;
    color: #fff;
    padding: 1em;
    border-radius: 1em 1em 0 0;
    text-align: center;
    margin-bottom: 4px;
  }
  ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  li {
    padding: 1em;
    background-color: #fff;

    a {
      color: #2c3d3a;
    }
  }

  + .monthly-archive {
    margin-top: 40px;
  }
}

/*Pagenation*/
.pagination {
  margin: 4em 0 0 0;
  text-align: center;
}

.pagination ul {
  margin: 0;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  list-style-type: none;
  gap: 1em;
}

.pagination li .page-numbers {
  background: none repeat scroll 0 0 #7b7b7b;
  border-radius: 3px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;

  text-decoration: none;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.pagination li .page-numbers.current {
  background-color: #0054a7;
}

.pagination li .page-numbers:hover {
  background-color: #444444;
  opacity: 0.8;
  transition-duration: 500ms;
  transition-property: all;
  transition-timing-function: ease;
}

.btn_back_archive {
  width: 960px;
  margin: 40px auto 40px auto;
  text-align: right;
}

.single_pager {
  text-align: center;
}

.entry {
  + .pagination {
    li.active {
      width: 100px;
    }

    li a {
      width: 100px;
    }
  }
}

.nav-links {
  margin: 0;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1em;
  > a,
  > span {
    background: none repeat scroll 0 0 #7b7b7b;
    border-radius: 3px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 50px;

    text-decoration: none;
  }

  > a {
    &:hover {
      background-color: #444444;
      opacity: 0.8;
      transition-duration: 500ms;
      transition-property: all;
      transition-timing-function: ease;
    }
  }

  > span {
    opacity: 0.5;
  }
}

.blog-body {
  .entry-detail {
    font-size: 0.866rem;
    width: 85%;
    max-width: 800px;
    margin: 0 auto 110px auto;
    letter-spacing: 0.05em;
    line-height: 2;
    @media screen and (max-width: 1024px) {
      width: 100%;
    }

    p {
      margin: 1em 0;
    }

    img {
      display: block;
      margin: 1em 0;

      &.alignleft {
        width: calc(50% - 0.75em);
        margin-right: 1.5em;
        float: left;
      }

      &.alignright {
        width: calc(50% - 0.75em);
        margin-left: 1.5em;
        float: right;
      }

      &.aligncenter {
        width: calc(50% - 0.75em);
        margin-left: auto;
        margin-right: auto;
      }

      &.alignnone {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
      }
    }

    .wp-caption {
      max-width: 100%;
    }

    ul,
    ol {
      display: block;
      margin: 1em 0;
      padding-left: 1.5em;
    }

    blockquote {
      border: solid 1px #ddd;
      padding: 2em;
      margin: 1em 0;
    }

    h1 {
      font-size: 150%;
    }

    h2 {
      font-size: 140%;
    }

    h3 {
      font-size: 130%;
    }

    h4 {
      font-size: 120%;
    }

    h5 {
      font-size: 110%;
    }

    h6 {
      font-size: 105%;
    }

    iframe {
      &[src^="https://www.youtube.com/embed"]
      {
        width: 100%;

        @media screen and (min-width: 942px) {
          height: 450px;
        }

        @media screen and (max-width: 941px) {
          height: 47.8vw;
        }
      }
    }
  }

  .sectionNews_recent {
    border-top: solid 1px #000;
    padding-top: 80px;
  }

  @media screen and (max-width: 1024px) {
    .sectionNews {
      padding-bottom: 13vw;
      margin-bottom: 0;
    }

    .entry_header {
      margin-bottom: 1rem;
    }

    .entry_cats {
      font-size: 0.86rem;
    }

    .entry_date {
      font-size: 0.86rem;
    }

    .entry_title {
      font-size: 1rem;
      margin-bottom: 0.5em;
    }

    .entry_body {
      margin-bottom: 20vw;

      img {
        &.alignleft,
        &.alignright,
        &.aligncenter,
        &.alignnone {
          float: none;
          width: 100%;
          margin-left: auto;
          margin-right: auto;
        }
      }
    }

    .sectionNews_recent {
      padding-top: 10vw;
      padding-bottom: 8vw;
      margin-bottom: 0;
    }
  }
}
