:root {
  --corporate-color: #004ea2; /* コーポレートカラー */
  --contents-color_1: #f2f2f2; /* コンテンツカラー1 */
  font-size: 62.5%; /*文字サイズルート指定*/
  --margin-small: 8px;
  --margin-middle: 16px;
  --margin-large: 40px;
}
html {
  font-family:
    "游ゴシック Medium", YuGothic, YuGothicM, "Hiragino Kaku Gothic ProN",
    "Hiragino Kaku Gothic Pro", メイリオ, Meiryo, sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-spacing-trim: trim-start;
  text-autospace: normal;
  scrollbar-gutter: stable;
}
body {
  font-size: clamp(1.4rem, 1.35rem + 0.25vw, 1.6rem);
  letter-spacing: 0.5px;
  font-weight: 500;
  &:focus-visible {
    outline: 3px solid var(--corporate-color);
  }
}

/* 上に戻るボタン */
.pagetop {
  height: 70px;
  width: 70px;
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--corporate-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.8s;
  .pagetop__inner {
    position: relative;
    .pagetop__arrow {
      height: 20px;
      width: 20px;
      border-top: 3px solid #fff;
      border-right: 3px solid #fff;
      transform: translateY(20%) rotate(-45deg);
      display: block;
      position: absolute;
      left: 15px;
      top: -10px;
    }
    .pagetop__text {
      color: #fff;
      font-size: 1.2rem;
      display: block;
      position: relative;
      bottom: -10px;
    }
  }
}
.pagetop-visible {
  opacity: 1;
}

/* ヘッダー */
.header {
  .header__inner {
    width: min(90vw, 1650px);
    margin-inline: auto;
    padding: 2% 0;
    position: relative;
  }
  .header__logo {
    position: absolute;
    top: -0.1%;
    left: -5%;
    width: clamp(160px, 100%, 300px);
    height: auto;
    z-index: 10;
  }
  .header-gnav {
    background-color: #fff;
    .header-gnav__title {
      color: var(--corporate-color);
      margin-bottom: var(--margin-small);
      text-align: right;
    }
    .header-gnav__list {
      width: fit-content;
      margin-left: auto;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 200px));
      gap: 2%;
      font-size: 1.8rem;
      li {
        text-align: center;
        border: 1px solid var(--corporate-color);
        border-radius: 8px;
        padding: 2% 0;
        color: var(--corporate-color);
        &:last-child {
          color: #fff;
          background-color: var(--corporate-color);
        }
        a {
          display: block;
          width: 100%;
          height: auto;
        }
      }
    }
  }
}
/* メインビジュアル */
.swiper-container,
.swiper-slide {
  width: min(90vw, 1650px);
  height: 600px;
  margin: 0 auto;
  position: relative;
  img {
    border-radius: 20px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
  }
  .img04 {
    object-position: 50% 30%;
  }
  .img06 {
    object-position: top center;
  }
  .img07 {
    object-position: bottom center;
  }
}
.swiper-pagination {
  margin-top: var(--margin-middle);
  position: relative;
  --swiper-theme-color: var(--corporate-color);
}
.swiper-play-trigger {
  position: absolute;
  right: 0;
  bottom: -50px;
  z-index: 10;
  .swiper_pause,
  .swiper_start {
    background-color: #fff;
    border: none;
    width: 50px;
    position: relative;
    &:hover {
      top: 2px;
    }
  }
}

/* ご挨拶 */
.message {
  width: 100vw;
  display: grid;
  grid-template-columns: 0.3fr 1fr 1fr;
  gap: 2%;
  margin: calc(var(--margin-large) * 3) 0;
  .text {
    span {
      display: block;
      font-weight: 600;
      margin-top: var(--margin-middle);
    }
  }
}

/* 共通見出し */
.heading {
  color: var(--corporate-color);
  font-size: clamp(2rem, 1.7rem + 1.5vw, 3.2rem);
  margin: 0 auto var(--margin-large);
  position: relative;
  width: fit-content;
  &::after {
    content: "";
    position: absolute;
    left: 25%;
    bottom: -10%;
    display: block;
    width: 50%;
    border-bottom: 1px solid var(--corporate-color);
  }
}

/* デバイス改行 */
.--sp {
  display: none;
}
.--pc {
  display: block;
}

/* 歴史年表 */
.history {
  width: min(1300px, 95vw);
  margin-inline: auto;
  .history__inner {
    width: 100%;
  }

  /* タブ */
  .history__tabs {
    width: 100%;
  }
  .history__tab-list {
    display: flex;
    gap: 8px;
    /* 
    align-items: stretch;
    width: 100%; */
  }
  .history__tab {
    flex: 1;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 95%;
    height: 60px;
    padding: 1%;
    border: 0;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid var(--corporate-color);
    border-radius: 10px;
    color: var(--corporate-color);
    &[aria-selected="true"] {
      background-color: var(--corporate-color);
      color: #fff;
    }
  }
  .history__select {
    display: none;
  }
  .history__select-label {
    width: 100%;
    display: block;
    text-align: center;
  }
  .history__select-control {
    width: 100%;
    min-height: 48px;
    padding: 8px 40px 8px 12px;
    border: 2px solid #707070;
    background-color: #fff;
    font: inherit;
  }

  /* タブコンテンツ */
  .history__contents {
    width: 100%;
  }
  .history__panel {
    width: 100%;
    padding-top: var(--margin-large);
    opacity: 1;
    transition: opacity 0.3s ease;
    &[hidden] {
      display: none;
    }
  }
  .history__panel.is-fading {
    opacity: 0;
  }
  .history__table-wrapper {
    width: 100%;
    overflow-x: auto;
  }
  .history__table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 4px;
    th,
    td {
      padding: 1%;
      vertical-align: middle;
    }
    thead {
      th {
        background-color: var(--contents-color_1);
        color: var(--corporate-color);
        font-weight: 700;
        text-align: left;
        &:nth-child(1) {
          width: 15%;
        }
        &:nth-child(2) {
          width: 10%;
        }
        &:nth-child(3) {
          width: 55%;
        }
        &:nth-child(4) {
          width: 10%;
        }
      }
    }
    .history__table-body {
      td {
        border-bottom: 1px solid #707070;
        padding: var(--margin-small) 0;
        &:nth-child(4) {
          text-align: center;
        }
      }
      .history__table-row--continued {
        td {
          border-bottom: none;
        }
      }
      .history__table-cell--year-hidden {
        color: transparent;
      }
    }
  }

  .history__detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: auto;
    padding: 0;
    border: 0;
    background-color: #fff;
    cursor: pointer;
    .history__detail-text {
      display: none;
    }
  }
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.7);
  transition: all 1.5s linear;
}
html.modal-open,
body.modal-open {
  overflow: hidden;
}
.modal__content {
  background-color: #fff;
  border-radius: 20px;
  overflow-y: auto;
  padding: 3% 0;
  width: min(1000px, 100%);
  max-height: 90vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: show 0.4s linear 0s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal__content.--contain1 {
  padding: 20% 0;
  justify-content: center;
}
.modal__content.--contain2 {
  padding-top: 8%;
}
.modal__container {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 4%;
  position: relative;
}
.modal__container-img {
  width: min(720px, 100%);
  height: fit-content;
  margin-bottom: var(--margin-large);
  img {
    width: min(720px, 100%);
    max-height: 500px;
    border-radius: 20px;
    object-fit: cover;
    object-position: center center;
    margin: auto;
  }
  .--contain {
    object-fit: contain;
  }
  figcaption {
    font-size: 1.4rem;
    text-align: center;
  }
}

.modal__ttl,
.modal-section__ttl {
  width: 100%;
  font-size: clamp(1.8rem, 1.32rem + 2.4vw, 2.4rem);
  font-weight: bold;
  color: var(--corporate-color);
  word-break: keep-all;
  line-break: auto;
  margin-bottom: var(--margin-small);
}
.no-break {
  white-space: nowrap;
}
.modal__text {
  line-height: 1.8;
  font-weight: 400;
  line-break: strict;
  word-break: normal;
}
.modal__close {
  position: absolute;
  top: 8vh;
  right: calc((100vw - min(1000px, 100vw)) / 2 + 24px);
  width: 80px;
  height: 80px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: var(--corporate-color);
  cursor: pointer;
  z-index: 1000;
  &::before,
  &::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 2px;
    background-color: #fff;
    transform-origin: center;
  }
  &::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  &::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}
.modal__close:focus-visible {
  outline: 3px solid #000;
  outline-offset: 4px;
}

/* フッター */
.footer {
  width: min(480px, 90vw);
  margin: var(--margin-large) auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--margin-middle) * 2.5);
  .footer__title {
    color: var(--corporate-color);
    font-size: clamp(1.8rem, 0.6rem + 6vw, 2.4rem);
    font-weight: bold;
  }
  .footer__logo {
    width: min(240px, 100%);
    margin: auto;
    p {
      width: min(240px, 100%);
      color: var(--corporate-color);
      margin-top: var(--margin-middle);
      padding-right: var(--margin-large);
      text-align: center;
      &::after {
        content: "　";
        margin-left: var(--margin-small);
        width: 40px;
        height: auto;
        background-image: url("../../images/new-window.png");
        background-size: contain;
        background-repeat: no-repeat;
      }
    }
  }
}
.footer__copyright {
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  span {
    margin-right: 0.5em;
  }
}

/* ノートpc調整 */
@media print, screen and (max-width: 1024px) {
  /* ヘッダー */
  .header {
    .header__inner {
      width: 90vw;
      padding: 0;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      margin-bottom: var(--margin-middle);
    }
    .header__logo {
      position: relative;
      top: 0;
      left: 0;
      z-index: 10;
      display: flex;
      align-self: center;
      width: max(160px, 50%);
    }
    .header-gnav {
      width: 100;
      .header-gnav__title {
        font-size: clamp(1.4rem, 0.971rem + 2.14vw, 2rem);
        text-align: left;
        letter-spacing: 0;
        line-height: 1.4;
      }
      .header-gnav__list {
        width: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 2%;
        font-size: 1.6rem;
        li {
          margin-bottom: calc(var(--margin-small) / 2);
        }
      }
    }
  }
  /* ご挨拶 */
  .message {
    width: 90vw;
    margin: calc(var(--margin-large) * 4) auto calc(var(--margin-large) * 3);
    display: flex;
    flex-direction: column-reverse;
    position: relative;
    .heading {
      position: absolute;
      top: -60px;
      left: calc(50% - 35px);
    }
    img {
      margin-bottom: var(--margin-middle);
      border-radius: 10px;
    }
  }
  .modal__content {
    width: 90vw;
    height: 90vh;
    padding: var(--margin-middle);
    box-sizing: border-box;
  }
  .modal__content.--contain1 {
    padding: 10%;
  }
  .modal__container {
    width: 100%;
    gap: 2%;
  }
  .modal__container-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: var(--margin-middle);
  }
  .modal__ttl {
    font-size: 2rem;
    word-break: break-all;
    line-break: auto;
  }
  .modal-section__ttl {
    font-size: 1.8rem;
  }
  .modal__close {
    position: fixed;
    width: 50px;
    height: 50px;
    top: 4vh;
    right: 10px;
    &::before,
    &::after {
      width: 32px;
    }
  }
}
/* スマートフォン */
@media print, screen and (max-width: 767px) {
  /* デバイス改行 */
  .--sp {
    display: block;
  }
  .--pc {
    display: none;
  }

  /* メインビジュアル */
  .swiper-container,
  .swiper-slide {
    height: 400px;
    .img03 {
      object-position: right center;
    }
    .img04 {
      object-position: 75% 50%;
    }
    .img06 {
      object-position: top left;
    }
  }
  /* 歴史年表 */
  .history {
    min-width: 350px;
    width: 95vw;
    margin-inline: auto;
    .history__tabs {
      display: none;
    }
    .history__select {
      display: block;
      width: 100%;
    }
    .history__panel {
      padding-top: var(--margin-large);
    }
    .history__table-wrapper {
      overflow-x: visible;
    }
    .history__table {
      thead {
        display: none;
      }
      tbody {
        display: block;
        width: 100%;
        tr {
          display: flex;
          flex-wrap: wrap;
          width: 100%;
        }
        td {
          box-sizing: border-box;
          &:nth-child(1) {
            display: block;
            width: 70%;
            border: none;
            color: var(--corporate-color);
            font-weight: bold;
            font-size: 1.8rem;
          }
          &:nth-child(2) {
            display: block;
            width: 30%;
            border: none;
            color: var(--corporate-color);
            font-weight: bold;
            font-size: 1.8rem;
          }
          &:nth-child(3) {
            display: block;
            width: 100%;
            border: none;
          }
          &:nth-child(4) {
            display: block;
            width: 100%;
          }
        }
      }
    }

    .history__detail-button {
      width: 100%;
      justify-content: flex-start;
      gap: 5%;
      img {
        width: 40px;
        height: auto;
      }
      .history__detail-text {
        display: block;
        color: var(--corporate-color);
        /* font-weight: bold; */
      }
    }
  }
  /* フッター */
  .footer {
    margin-top: calc(var(--margin-large) * 2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--margin-middle) * 2.5);
    .footer__title {
      color: var(--corporate-color);
      font-size: clamp(1.8rem, 0.6rem + 6vw, 2.4rem);
      font-weight: bold;
    }
    .footer__logo {
      width: min(240px, 100%);
      margin: auto;
      p {
        width: min(240px, 100%);
        color: var(--corporate-color);
        margin-top: var(--margin-middle);
        padding-right: var(--margin-large);
        text-align: center;
        &::after {
          content: "　";
          margin-left: var(--margin-small);
          width: 40px;
          height: auto;
          background-image: url("../../images/new-window.png");
          background-size: contain;
          background-repeat: no-repeat;
        }
      }
      .footer__copyright {
        font-size: 1.2rem;
      }
    }
  }
}
