/* 下層ページリセット */
header {
  @media screen and (max-width: 768px) {
    margin-bottom: 30px;
  }
}
/* 下層スタイル */
.under main a {
  text-decoration: underline;
  color: #660000;
  font-weight: 600;
}
main a[href$=".pdf"]:not(:has(img)),
main a[href$=".xlsx"]:not(:has(img)),
main a[href$=".docx"]:not(:has(img)),
main a[target="_blank"]:not([href$=".pdf"]):not([href$=".xlsx"]):not([href$=".dox"]):not(:has(img)) {
  color: #660000;
  font-weight: 600;
}

@media (hover: hover) {
  .under a:hover {
    opacity: 0.5;
  }
}

main a[href$=".pdf"]:not(:has(img))::after {
  content: "（PDFを開く）";
  font-size: 0.875rem;
}
main a[href$=".xlsx"]:not(:has(img))::after {
  content: "（Excelを開く）";
  font-size: 0.875rem;
}
main a[href$=".docx"]:not(:has(img))::after {
  content: "（Wordを開く）";
  font-size: 0.875rem;
}

main a[target="_blank"]:not([href$=".pdf"]):not([href$=".xlsx"]):not([href$=".dox"]):not(:has(img))::after {
  content: "（別ウィンドウで開く）";
  font-size: 0.875rem;
}
main a[href$=".pdf"][target="_blank"]:not(:has(img))::after {
  content: "（別ウィンドウでPDFを開く）";
  font-size: 0.875rem;
}
main a[href$=".xlsx"][target="_blank"]:not(:has(img))::after {
  content: "（別ウィンドウでExcelを開く）";
  font-size: 0.875rem;
}
main a[href$=".docx"][target="_blank"]:not(:has(img))::after {
  content: "（別ウィンドウでWordを開く）";
  font-size: 0.875rem;
}
h1 {
  text-align: center;
  margin: 20px 0;
  font-size: 2rem;
  @media screen and (max-width: 768px) {
    font-size: 1.6875rem;
  }
}
h2 {
  color: #000;
  font-size: 1.4375rem;
  border-bottom: 4px solid #e94242;
  padding-bottom: 15px;
  position: relative;
  @media screen and (max-width: 768px) {
    font-size: 1.375rem;
  }
}
h2::before {
  content: "";
  position: absolute;
  width: 125px;
  border: 2px solid #660000;
  bottom: -4px;
}
h3 {
  margin-bottom: 30px;
  color: #660000;
  font-size: 1.4375rem;
  border-top: 2px solid;
  border-bottom: 2px solid;
  padding: 15px 0;
  @media screen and (max-width: 768px) {
    font-size: 1.375rem;
  }
}
.under main {
  margin-bottom: 100px;
}
.under .page-head {
  color: #fff;
  position: relative;
  /*
  height: 210px;
  display: flex;
  justify-content: center;
  align-items: center;
  */
  margin-top: 78px;
  @media screen and (max-width: 768px) {
    height: 130px;
    margin-top: 63px;
  }
}
.under .page-head .page-head-inner {
  height: 210px;
  color: #fff;
  max-width: 90%;
  margin: 0 auto;
  display: flex;
  /*justify-content: center;*/
  align-items: center;
  @media screen and (max-width: 768px) {
    height: 130px;
  }
}
.under .page-head .h1-wrap {
  color: #000;
  z-index: 100;
  position: relative;
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
}
.under .page-head .h1-wrap h1 {
  text-align: left;
  background: rgba(255, 255, 255, 0.7);
  padding: 5px 25px 8px;
  box-sizing: border-box;
  font-weight: normal;
  width: fit-content;
  line-height: 1.2;
  @media screen and (max-width: 768px) {
    font-size: 1.5625rem;
  }
}
.under .page-head div:nth-child(2) {
  width: 100%;
  height: 210px;
  position: absolute;
  top: 0;
  left: center;
  @media screen and (max-width: 768px) {
    height: 130px;
  }
}
.under .page-head img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.7;
}

.under .under-contents-wrap h1 {
  font-size: 1.75rem;
  margin-bottom: 50px;
  background-color: #fff;
  padding: 25px 15px;
  line-height: 40px;
  @media screen and (max-width: 768px) {
    font-size: 1.6875rem;
    padding: 20px 15px;
  }
}
.breadcrumb {
  font-size: 0.875rem;
  width: 90%;
  max-width: 1000px;
  margin: 20px auto 40px;
  line-height: 1.5;
  @media screen and (max-width: 768px) {
    margin: 20px auto 30px;
  }
}
.under .breadcrumb a {
  font-weight: 400;
}
.under-contents-wrap {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}
.under-contents-wrap .child-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 2.7%;
  justify-content: flex-start;
  margin: 30px auto 0;
  margin-bottom: 50px;
  @media screen and (max-width: 768px) {
    justify-content: center;
    margin: 0;
    margin-top: 50px;
  }
}
.under-contents-wrap .child-wrap:has(.no-thumbnail) {
  gap: 2.7%;
  align-items: center;
}
.under-contents-wrap .child {
  font-weight: 700;
  width: 31.5%;
  max-width: 400px;
  text-align: center;
  font-size: 1.5625rem;
  @media screen and (max-width: 768px) {
    width: 47%;
    margin-bottom: 50px;
  }
  @media screen and (max-width: 600px) {
    width: 100%;
  }
}
.under-contents-wrap .child.no-thumbnail {
  font-weight: unset;
  font-size: unset;
  margin: 0;
  max-width: unset;
  @media screen and (max-width: 768px) {
    margin-bottom: 15px;
  }
}

.under-contents-wrap .child.no-thumbnail h2 {
  background-color: #fff;
  color: #660000;
  text-align: center;
  border-radius: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 40px 20px 25px;
  position: relative;
  border: 3px solid #660000;
  font-weight: 600;
  text-decoration: unset;
  font-size: clamp(16px, 1.8vw, 20px);
  word-break: auto-phrase;
}

/* .under-contents-wrap .child.no-thumbnail::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #660000;
  border-right: 0;
  margin-right: 5px;
} */
.child-wrap .child > a {
  margin-bottom: 20px;
  display: block;
  text-decoration: none;
  @media screen and (max-width: 768px) {
    font-size: 1.375rem;
  }
}
@media (hover: hover) {
  .child-wrap .child > a:hover {
    opacity: 0.5;
  }
}
.child-wrap .child.no-thumbnail > a {
  margin-bottom: 0;
}
.under-contents-wrap .child h2 {
  border: none;
  margin: 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  text-align: left;
}
.under-contents-wrap .child h2::before {
  content: "";
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 20px;
  background-color: #e3433f;
  margin-right: 10px;
  border: unset;
  position: unset;
}
.under-contents-wrap .child ul li {
  font-weight: 500;
  line-height: 1.5;
  width: 45%;
  flex-basis: 170px;
  flex-grow: 1;
}
.child ul li a {
  text-decoration: none;
  color: #fff;
  padding: 5px 10px;
  word-break: auto-phrase;
  line-height: 18px;
  display: block;
  width: 100%;
  text-emphasis: center;
}

.under-contents-wrap .child img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  margin-bottom: 15px;
  object-fit: cover;
  @media screen and (max-width: 768px) {
    margin-bottom: 5px;
  }
}

.grandchild_wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 3%;
  margin-top: 10px;
}

.grandchild {
  margin-bottom: 10px;
  font-size: 1rem;
  color: #fff;
  background-color: #e94242;
  border: none;
  text-decoration: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  padding: 0;
  line-height: 26px;
}

.under-contents-wrap dl {
  border-bottom: 1px solid #000;
  margin-bottom: 30px;
}

.category-wrap {
  margin: 70px auto 50px;
  max-width: 1000px;
  @media screen and (max-width: 768px) {
    margin: 50px auto 80px;
  }
}

.category-wrap ul {
  gap: 3%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.category-wrap ul li a {
  background-color: #fff;
  color: #660000;
  text-align: center;
  border-radius: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  padding: 20px 2px;
  position: relative;
  border: 3px solid #660000;
  font-weight: 600;
  text-decoration: unset;
  @media screen and (max-width: 768px) {
    margin-top: 0;
  }
}
.category-wrap p {
  margin-bottom: 10px;
}

/* ブロックエディタ */
.under-contents-wrap h2 {
  margin: 50px 0 30px;
  line-height: 30px;
  @media screen and (max-width: 768px) {
    margin-bottom: 30px;
  }
}
.under-contents-wrap p {
  line-height: 28px;
  margin-bottom: 30px;
}

.wp-block-table table {
  margin-bottom: 30px;
  @media screen and (max-width: 768px) {
    table-layout: auto !important;
    overflow-x: scroll;
    white-space: nowrap;
    margin-bottom: 5px;
  }
}
.wp-block-table {
  @media screen and (max-width: 768px) {
    margin-bottom: 50px;
  }
}
.wp-block-list {
  margin-bottom: 30px;
}
ul.wp-block-list {
  text-indent: 0px;
  padding-left: 0px;
}
ol.wp-block-list {
  text-indent: 0px;
  padding-left: 0px;
  list-style: none;
  counter-reset: my-count;
  padding-left: 0;
}

.wp-block-list li {
  margin-bottom: 8px;
  position: relative;
  line-height: 25px;
  padding-left: 10px;
}

ol.wp-block-list li {
  margin-bottom: 8px;

  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  line-height: 25px;
}

ol.wp-block-list li::before {
  padding-bottom: 2px;
  counter-increment: my-count;
  content: counter(my-count);
  position: absolute;
  left: 0;
  top: 5px;
  width: 15px;
  height: 13px;
  color: #000;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #000;
}

ul.wp-block-list li::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  background-color: #000;
  border-radius: 20px;
  flex-shrink: 0;
  margin-right: 5px;
  margin-top: 8px;
  position: absolute;
  left: 0;
  top: 2px;
}

/* テーブル */
/* .wp-block-table tr:nth-child(even) td:first-child {
  background-color: #fff;
}

.wp-block-table tr:nth-child(odd) td:first-child {
  background-color: #e0cccc;
} */
.wp-block-table td:not(:first-child) {
  background-color: unset;
}
.wp-block-table td,
.wp-block-table th {
  border: 1px dotted #000 !important;
  padding: 15px 10px !important;
  line-height: 20px;
}
.wp-block-table tr:last-child td,
.wp-block-table tr:last-child th {
  border-top: 1px dotted #000 !important;
  border-bottom: 1px dotted #000 !important;
}

/* ボタン用矢印 */
.under-arrow {
  position: absolute;
  display: inline-block;
  right: 20%;
}

.under-arrow::before,
.under-arrow::after {
  content: "";
  position: absolute;
  top: calc(50% - 0px);
  right: -23px;
  width: 7px;
  height: 2px;
  border-radius: 9999px;
  background-color: #660000;
  transform-origin: calc(100% - 1px) 50%;
}

.under-arrow::before {
  transform: rotate(45deg);
}

.under-arrow::after {
  transform: rotate(-45deg);
}
/* news blog */
.under.archive dl.item .title {
  display: block;
  margin-bottom: 10px;
}
.under.archive dl.item .title p {
  margin-bottom: 0;
  margin-right: 10px;
  font-size: 1.25rem;
  font-weight: 600;
}
.under.archive dl.item .title p .date {
  display: block;
  font-size: 1rem;
}
.under.archive dl.item .title div p {
  display: flex;
  align-items: center;
  margin-top: 5px;
  @media screen and (max-width: 768px) {
    display: block;
  }
}
.under .read-more a {
  text-decoration: underline;
}
.under dl.item .category {
  margin-left: 20px;
}
.under.blog dl.item dd {
  display: flex;
  @media screen and (max-width: 768px) {
    display: block;
    width: 100%;
  }
}
.under dl.item img {
  width: 350px;
  height: 230px;
  object-fit: cover;
  margin: 10px 0 30px;
  @media screen and (max-width: 768px) {
    width: 100%;
    object-fit: contain;
  }
}

.under dl.item dd {
  display: flex;
  gap: 35px;
  @media screen and (max-width: 768px) {
    display: block;
  }
}
.under.news .cate-wrap {
  @media screen and (max-width: 768px) {
    margin-bottom: 2px;
  }
}
.single-contents::after {
  content: "";
  display: block;
  clear: both;
}

.koutyou-photo img {
  object-fit: cover;
  border-radius: 50%;
  width: 200px;
}
/* ページネーション */
.page-numbers {
  display: flex;
  color: #fff;
  justify-content: center;
}
.page-numbers li {
  width: 45px;
  height: 40px;
  border-right: 1px solid #fff;
  background-color: #660000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-numbers li span {
  color: rgba(255, 255, 255, 0.5);
}
.page-numbers li a {
  width: 100%;
  height: 100%;
  display: flex;
  display: flex;
  justify-content: center;
  color: #fff;
  align-items: center;
  text-decoration: none;
  font-weight: 400;
}

.page-numbers li:last-child {
  border-right: unset;
}
.page-numbers li:last-child {
  border-radius: 0 20% 20% 0;
}
.page-numbers li:first-child {
  border-radius: 20% 0 0 20%;
}

/* ボタン */
.under .bg-btn a {
  background-color: #660000;
  color: #fff;
  text-align: center;
  border-radius: 35px;
  margin: 0 auto;
  width: 130px;
  display: block;
  font-weight: 400;
  margin-top: 50px;
  padding: 17px 10px;
  text-decoration: unset !important;
}
