@charset "UTF-8";

body {
  background: url(../img/background.jpg) repeat center center !important;
  background-size: cover;
  font-family: "Zen Kaku Gothic New", serif;
  color: #323844;
  line-height: 1.4;
}

a {
  text-decoration: none;
  color: #323844;
}

.wrapper {
  max-width: 1040px;
  margin: 0 auto 80px;
  text-align: center;
}

.sectiontitle {
  font-family: "Kaisei HarunoUmi", serif;
  font-size: 30px;
  text-align: center;
  margin: 60px auto 80px;
  display: inline-block;
  position: relative;
  color: #323844;
  padding-bottom: 14px;
}

/*ページタイトルの装飾*/
.sectiontitle::before,
.sectiontitle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  background-color: #d25729;
}

.sectiontitle::before {
  bottom: 0;
  height: 5px;
  width: 100%;
}

.sectiontitle::after {
  bottom: 7px;
  height: 2px;
  width: 100%;
}

.backgroundwrap {
  background: url(../img/bgpattern.png) repeat center center;
  background-blend-mode: overlay;
  max-width: 800px;
  margin: 0 auto 80px;
  padding: 30px 0;
  display: flex;
  /* 子要素が横幅を超えたら折り返す */
  flex-wrap: wrap;
  /* 子要素を中央寄せにする */
  justify-content: center;
  position: relative;
}

/* 下敷き左右の装飾 */
.backgroundwrap::before,
.backgroundwrap::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100%;
  top: 0;
  bottom: 0;
  background-color: #d25729;
}

.backgroundwrap::before {
  left: -100px;
}

.backgroundwrap::after {
  right: -100px;
}

.newswrap {
  background-color: #FFFFF0;
  padding: 20px;
  margin: 20px;
  width: 340px;
  height: auto;

  /* 影をつけて台紙が浮いているような表現を追加*/
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.newswrap:nth-child(5) {
  margin-right: auto;
}

/* ホバー時の装飾 */
.newswrap:hover {
  /* 影を濃くする */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  /* 少し上に移動させる */
  transform: translateY(-3px);
  /* アニメーションを追加 */
  transition: all 0.3s ease;
}

.newswrap a {
  display: block;
  text-align: center;
}

.newsimg {
  width: 300px;
  height: 230px;
  margin-bottom: 10px;
  display: block;
  /* 中央寄せのためにブロック要素化 */
  margin-left: auto;
  margin-right: auto;
}

.newsdate {
  color: #777;
  font-size: 14px;
  display: block;
  margin: 5px 0 10px;
  font-weight: normal;
}

.newstitle {
  font-size: 16px;
  /* h2タグのデフォルトマージンをリセット */
  margin: 0;
  padding-top: 5px;
  border-top: 1px solid #eee;
}

/* --- ここからモバイル版レイアウトのCSS --- */
@media screen and (max-width: 959px) {

  .wrapper {
    max-width: none;
    padding: 0 10px;
  }

  .sectiontitle {
    font-size: 30px;
    margin: 60px auto;
    padding-bottom: 0;
    line-height: 1.8;
  }

  .backgroundwrap {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 16px 26px 32px 26px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* 装飾のサイズ調整 */
  .backgroundwrap::before,
  .backgroundwrap::after {
    display: block;
    width: 26px;
  }

  .backgroundwrap::before {
    left: 0;
  }

  .backgroundwrap::after {
    right: 0;
  }

  .newswrap {
    width: calc(100% - (26px * 2));
    height: auto;
    margin: 10px;

    /* 5番目の要素の特殊な設定を解除 (縦並びのため不要) */
    margin-right: 0 !important;
  }

  .newsimg {
    width: 100%;
    height: auto;
  }

}

/* --- ここまでモバイル版レイアウトのCSS --- */