@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c&display=swap');

/* ベーススタイル */
html, body, :root {
  height: 100%;
}

[id] {
  scroll-margin-top: 80px;
}

* {
  border-color: #e5e7eb; /* gray-200 */
}

body {
  background-color: #fff;
  color: #393939;
  letter-spacing: 0.03em;
  line-height: 160%;
  font-family: "M PLUS Rounded 1c", sans-serif;
}

/* microCMS リッチテキスト用スタイル */
.cms-content h1 { font-size: 24px; font-weight: bold; margin: 32px 0 16px; }
.cms-content h2 {
  font-size: 18px;
  font-weight: bold;
  border-left: 4px solid #b80000;
  padding-left: 12px;
  margin: 32px 0 16px;
}
.cms-content h3 {
  font-size: 16px;
  font-weight: bold;
  border-bottom: 2px solid #b80000;
  padding-bottom: 8px;
  margin: 24px 0 12px;
}
.cms-content h4 {
  font-size: 14px;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
  padding-bottom: 4px;
  margin: 20px 0 8px;
}
.cms-content p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.cms-content a {
  color: #347694;
  text-decoration: underline;
}
.cms-content a:hover {
  opacity: 0.7;
}
.cms-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}
.cms-content ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}
.cms-content ol {
  list-style: decimal;
  padding-left: 20px;
  margin-bottom: 16px;
}
.cms-content li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.8;
}
.cms-content u {
  text-decoration: none;
  background: linear-gradient(transparent 60%, #fff799 60%);
}
.cms-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.cms-content table th,
.cms-content table td {
  border: 1px solid #ddd;
  padding: 8px;
  font-size: 14px;
}
.cms-content table th {
  background-color: #f5f5f5;
  font-weight: bold;
}
.cms-content table tr:nth-child(even) {
  background-color: #f9f9f9;
}
.cms-content table tr:hover {
  background-color: #f0f0f0;
}
.cms-content pre {
  background: #333;
  color: #fff;
  padding: 16px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 16px 0;
}
.cms-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}

@media (min-width: 1024px) {
  .cms-content h1 { font-size: 28px; }
  .cms-content h2 { font-size: 24px; }
  .cms-content h3 { font-size: 22px; }
  .cms-content h4 { font-size: 18px; }
  .cms-content p { font-size: 16px; }
  .cms-content li { font-size: 16px; }
}

/* 施設画像スライダー（CSS animation） */
@keyframes facility-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * (280px + 20px) * 4)); }
}

@media (min-width: 1024px) {
  @keyframes facility-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-1 * (350px + 40px) * 4)); }
  }
}

.facility-track {
  animation: facility-scroll 20s linear infinite;
  will-change: transform;
}

.facility-track:hover {
  animation-play-state: paused;
}

/* FAQ アコーディオン */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.is-open {
  max-height: 500px;
}

/* ハンバーガーメニュー */
.hamburger-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.hamburger-menu.is-open {
  transform: translateX(0);
}

body.menu-open {
  overflow: hidden;
}

.p-home-greeting__image img {
  border-radius: 10px;
  box-shadow: 3px 3px 6px rgba(0,0,0,.3);
}

@media screen and (max-width:767px) {
  .p-home-greeting__image img {
    width: 80%;
    margin: 0 auto;
  }
}

.p-home-service__banner {
  max-width: 900px;
  width: 100%;
  margin: 0 auto 80px;
}

.p-home-service__item {
  box-shadow: 3px 3px 3px rgba(0,0,0,.3);
}

.p-home-service__item.is-coming {
  position: relative;
  box-shadow: 0 0 0;
}

.p-home-service__item.is-coming::before {
  content: "coming soon";
  display: grid;
  place-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap
}

@media screen and (max-width: 767px) {
  .p-home-service__banner {
    margin-bottom: 60px;
  }

  .p-home-service__item {
    padding: 1rem 0 !important;
    font-feature-settings: 'palt';
    letter-spacing: 0 !important;
  }

  .p-home-flow__grid {
    gap: 0 !important;
  }
}

.p-home-kv {
  max-width: calc(1320 / 1400 * 100vw);
  width: 100%;
  aspect-ratio: 1200 / 700;
  margin: 0 auto 100px 0;
  background: url(../images/home/kv_bg.webp) 50% 50% / 100% no-repeat;
}

.p-home-kv__content {
  padding-left: calc(90 / 1400 * 100vw);
  box-sizing: border-box;
  position: relative;
}

.p-home-kv__department {
  width: calc(1020 / 1400 * 100vw);
  position: absolute;
  top: calc(40 / 1400 * 100vw);
  left: calc(90 / 1400 * 100vw);
}

.p-home-kv__icons {
  width: calc(480 / 1400 * 100vw);
  position: absolute;
  top: calc(242 / 1400 * 100vw);
  right: calc(20 / 1400 * 100vw);
}

.p-home-kv__title {
  display: flex;
  flex-direction: column;
  gap: calc(11 / 1400 * 100vw);
  position: absolute;
  top: calc(316 / 1400 * 100vw);
  left: 0;
}

.p-home-kv__title span {
  display: block;
  width: fit-content;
  padding: calc(6 / 1400 * 100vw) calc(35 / 1400 * 100vw) calc(12 / 1400 * 100vw) calc(90 / 1400 * 100vw);
  border-radius: 0 50px 50px 0;
  box-sizing: border-box;
  background: #FFF;
  line-height: calc(72 / 50);
  letter-spacing: 0.05em;
  font-size: calc(50 / 1400 * 100vw);
  font-weight: 700;
  color: #57A9A3;
}

@media screen and (max-width: 767px) {
  .p-home-kv {
    max-width: max(355px, calc(355 / 375 * 100vw));
    aspect-ratio: 335 / 354;
    margin-bottom: max(129px, calc(129 / 375 * 100vw));
    background-image: url(../images/home/kv_bg-sp.webp);
  }

  .p-home-kv__department {
    max-width: max(270.6px, calc(270.6 / 375 * 100vw ));
    top: max(1.9px, calc(1.9 / 375 * 100vw));
    left: 50%;
    translate: -50% 0;
  }

  .p-home-kv__icons {
    width: max(240px, calc(240 / 375 * 100vw));
    top: max(223px, calc(223 / 375 * 100vw));
    right: max(-15px, calc(-15 / 375 * 100vw));
  }

  .p-home-kv__title {
    gap: max(4.9px, calc(4.9 / 375 * 100vw));
    top: max(75.8px, calc(75.8 / 375 * 100vw));
  }

  .p-home-kv__title span {
    padding: max(1.8px, calc(1.8 / 375 * 100vw)) max(15px, calc(15 / 375 * 100vw)) max(4.7px, calc(4.7 / 375 * 100vw)) max(13.5px, calc(13.5 / 375 * 100vw));
    line-height: calc(32.4 / 22.95);
    font-size: max(22.95px, calc(22.95 / 375 * 100vw));
  }
}

.p-home-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34.8px min(80px, calc(80 / 1400 * 100vw));
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}

.p-home-features__item_image {
  border-radius: 20px;
  overflow: hidden;
}

.p-home-features__item_body {
  padding: 12px 0 0;
}

.p-home-features__item_sign {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #377895;
}

.p-home-features__item_num {
  line-height: 1.2;
  font-size: 24px;
  font-weight: 700;
}

.p-home-features__item_title {
  line-height: 1.4;
  font-size: 20px;
  font-weight: 700;
}

.p-home-features__item_copy {
  margin: 5px 0 0;
  line-height: 1.4;
  letter-spacing: 0.05em;
  font-size: 20px;
  font-weight: 700;
  color: #377895;
}

.p-home-features__item_caption {
  margin: 14.2px 0 0;
  line-height: calc(26.25 / 15);
  font-size: 15px;
  font-weight: 500;
}

@media screen and (max-width: 767px) {
  .p-home-features .slick-arrow {
    width: max(40px, calc(40 / 375 * 100vw));
    aspect-ratio: 1 / 1;
    background: url(../images/home/slick-arrow.svg) 50% 50% / 100% no-repeat;
    position: absolute;
    top: max(89px, calc(89 / 375 * 100vw));
    z-index: 1;
  }

  .p-home-features .slick-arrow.slick-prev {
    left: max(-15px, calc(-15 / 375 * 100vw));
  }

  .p-home-features .slick-arrow.slick-next {
    right: max(-15px, calc(-15 / 375 * 100vw));
    scale: -1 1;
  }
}

.p-home-faq__att {
  margin: 0 0 45px;
}

.p-home-faq__att_title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
  line-height: calc(35 / 20);
  letter-spacing: 0.05em;
  font-size: 20px;
  font-weight: 700;
  color: #377895;
}

.p-home-faq__att_title::after {
  content: "";
  width: auto;
  height: 1px;
  background: #377895;
  flex: 1 1 auto;
}

.p-home-faq__att_list {
  line-height: calc(34 / 16);
  font-size: 16px;
  font-weight: 600;
}

.p-price {
  h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    margin: 0 auto 60px;
    font-size: 19px;
    font-weight: 700;
    color: #377895;

    & > strong {
      font-size: 32px;
    }
  }

  .wp-block-group {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
  }

  .wp-block-group + .wp-block-group {
    margin-top: 77.7px;
  }

  .wp-block-group {
    h3 {
      margin: 0 0 27px;
      padding: 10px 20px;
      border-radius: 10px;
      box-sizing: border-box;
      background: #73C6BD;
      line-height: calc(28 / 18);
      font-size: 18px;
      font-weight: 700;
      color: #FFF;
    }
    
    p {
      line-height: calc(20 / 14);
      font-size: 14px;
      font-weight: 400;
    }

    p.has-text-align-right {
      text-align: right;
    }

    h3 + p {
      margin: -20px 0 24.7px;
    }

    .wp-block-table + p {
      margin-top: 11.3px;
    }

    table {
      border: 1px solid #73C6BD;
      border-spacing: 0;
      border-radius: 10px;
      box-sizing: border-box;
      border-collapse: separate;
      overflow: hidden;
    }

    thead {
      border: 0;
    }

    tbody {
      border: 0;
    }

    th,td {
      border: 0.25px solid #73C6BD;
      text-align: center;
    }

    th {
      background: #E7F7F5;
    }

    td:first-child {
      background: #E7F7F5;
    }

    th {
      border: 0;
      border-bottom: 1px solid #73C6BD;
    }

    td {
      border-width: 0 1px 1px 0;
      border-style: solid;
      border-color: #73C6BD;
    }

    td:last-child {
      border-width: 0 0 1px 0;
    }

    tr:last-child td:first-child {
      border-width: 0 1px 0 0;
    }

    tr:last-child td:last-child {
      border-width: 0;
    }
  }
}