

/* レスポンシブ表示制御 (PC/Tablet/SP)
========================================================================== */
@media screen and (min-width: 841px) {
  .pc { display: block; }
  .tablet, .sp { display: none !important; }
}

@media screen and (min-width: 600px) and (max-width: 840px) {
  .tablet { display: block; }
  .pc, .sp { display: none !important; }
}

@media screen and (max-width: 599px) {
  .sp { display: block; }
  .pc, .tablet { display: none !important; }
}

/* 基本リンク設定
========================================================================== */
a {
  &:link { color: var(--text-primary); text-decoration: underline; }
  &:visited { color: var(--text-primary); }
  &:hover { text-decoration: none; }
  &:focus { outline: none; }

  /* 電話番号リンク */
  &.tel {
    text-decoration: none !important;
    color: var(--text-primary);
    font-size: var(--font-size-subheading);
    font-family: var(--font-number);
  }

  /* テキストインラインリンク */
  &.link {
    color: var(--text-primary);
    font-weight: bold;
    text-decoration: underline;
    &:hover { text-decoration: none; }
  }

  /* スマホでの電話番号タップ有効化設定 */
  &[href^="tel:"] {
    pointer-events: none;
    cursor: default;
    text-decoration: none;

    @media screen and (max-width: 1024px) {
      pointer-events: auto;
      cursor: pointer;
    }
  }
}

:target {
  outline: none;
  caret-color: transparent;
}

/* スムーススクロール用アンカー位置調整
========================================================================== */
.anchor {
  position: relative;
  scroll-margin-top: 80px;
}

.anchor-subpage {
  position: relative;
  scroll-margin-top: 120px;
}

@media screen and (max-width: 1024px) {
  .anchor,.anchor-subpage{ scroll-margin-top: 80px; }
}


/* 基本テキスト・フォント装飾
========================================================================== */
p + p {
  margin-top: 1.5em;
}

em {
  font-style: normal;
}

small{
  font-size:var(--font-size-caption);
}

.acenter { text-align: center; }
.aright { text-align: right; }

.textUnderline {
  padding: 0 .2em;
  border-bottom: 2px solid var(--color-secondary);
  font-weight: 700;
}

.textPoint {
  color: var(--color-accent);
  font-weight: 800;
}
.leadCenter{
  font-size: var(--font-size-accent);
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.summaryText{
  line-height: 2.2;
  font-size: var(--font-size-accent);
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.en, .number {
  font-family: var(--font-number);
  font-weight: 500;
}

@media screen and (max-width:599px) {
  .leadCenter,
  .summaryText{
      text-align: left;
      word-break:normal;
  }
}

/* 見出し（Heading）
========================================================================== */
.ttlType01 {
  line-height: var(--line-height-heading);
  display: flex;
  flex-wrap: wrap;
  align-items: first baseline;
  gap:1em 3em;
  margin-bottom:4.5em;
  font-weight: 900;

  .en {
    line-height: 1;
    font-size: clamp(4rem, 3.33vw + 2.01rem, 6rem);
    font-family: var(--font-english);
    display: inline-block;

    &::first-letter {
    font-size: 1.2em;
    color:var(--color-primary);
    }
  }
  &.white { color: #fff; 
    .en {color: #fff;background: none;
        &::first-letter {
        color:var(--color-secondary);
      }
    }
  }
  .jp{
    position: relative;
    line-height: 1;
    font-weight: 800;
    display: inline-block;
    &::before{
      content: "／";
      display: inline-block;
      margin-right: 5px;
    }
  }


  * + & { margin-top: 2em; }
}

.ttlType02 {
  line-height: var(--line-height-heading);
  display: flex;
  flex-direction: column;
  gap: 18px 10px;
  margin: 1em auto 2.4em;
  padding: 0 20px 10px;
  width: fit-content;
  font-size: var(--font-size-heading);
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  .subTtl {
    display: inline-block;
    position: relative;
    width: fit-content;
    margin: 0 auto;
    font-family: var(--font-english);
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    &::before {
      content: "";
      display: inline-block;
      position: absolute;
      width: 0.7em;
      height: 1px;
      background-color: var(--text-primary);
      top: 0.5em;
      right: calc(100% + 0.3em);
    }
    &::after {
      content: "";
      display: inline-block;
      position: absolute;
      width: 0.7em;
      height: 1px;
      background-color: var(--text-primary);
      top: 0.5em;
      left: calc(100% + 0.3em);
    }
  }
}

@media screen and (max-width: 599px) {
  .ttlType02 {
    margin: 1em auto 1.5em;
    padding: 0 0 10px;
  }
}

.ttlType03 {
  line-height: var(--line-height-subheading);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 2em;
  padding: .6em 0;
  background-color: #fff;
  border-top: 2px solid var(--color-primary);
  border-bottom: 1px solid #ddd;
  font-size: clamp(1.8rem, 1.6vw + 0.8rem, 2.2rem);
  font-weight: 800;
}


@media screen and (max-width:840px) {
  .ttlType01 {
    margin-bottom:2.5em;
  }
}


/* リスト（List）
========================================================================== */
p + .listType01,
p + .listDecimal,
p + .listBrackets {
  margin-top: 1.8em;
}

/* 四角ドットリスト */
.listType01 {
  display: flex;
  flex-direction: column;
  gap: 0 1em;
  padding-left: 0.6em;

  li {
    position: relative;
    padding-bottom: 5px;
    padding-left: 16px;

    &::after {
      display: block;
      content: '';
      position: absolute;
      top: .8em;
      left: 0;
      width: 5px;
      height: 5px;
      border-radius: 3em;
      background-color: var(--text-primary);
    }

    ul {
      margin-top: .8em;
      margin-bottom: .8em;

      li::after {
        display: block;
        content: '';
        position: absolute;
        top: .8em;
        left: 0;
        width: 10px;
        height: 3px;
        border-radius: 0;
        background-color: var(--color-primary);
      }
    }
  }

  &.flex {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2em;
  }
}

/* 数字リスト */
.listDecimal {
  counter-reset: li;
  list-style: none;
  padding-left: 0;

  & > li {
    position: relative;
    padding-left: 2.5em;
    & + li { margin-top: 1em; }

    &::before {
      content: counter(li) "";
      counter-increment: li;
      position: absolute;
      top: 2px;
      left: 0;
      width: 1.6em;
      height: 1.6em;
      background-color: var(--color-primary);
      border-radius: 50px;
      color: #fff;
      line-height: 1.5;
      text-align: center;
      font-weight: 500;
    }
  }

  ul, ol {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
  }
}

/* カッコ数字リスト () */
.listBrackets {
  counter-reset: number;
  position: relative;

  & > li {
    position: relative;
    padding-left: 2em;
    & + li { margin-top: 1em; }

    &::before {
      content: "(" counter(number) ")";
      counter-increment: number;
      position: absolute;
      left: 0;
    }
  }
}


/* 7. ボタン（Button）
========================================================================== */
p + .btnLink{margin-top: 30px;}
.btnLink.center{text-align: center;}
.btnLink a{
  position: relative;
  z-index: 1;
  isolation: isolate; /* 親背景があっても::beforeを表示させる設定 */
  display: inline-block;
  padding: 1em 50px 1em 40px;
  line-height: var(--line-height-heading);
  border: 1px solid var(--color-accent);
  box-sizing: border-box;
  background: var(--color-accent);
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  transition: color 0.3s;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #fff;
    z-index: -1;
    transition: width 0.3s ease;
  }
  &::after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: rotate(45deg) translateY(-50%);
    width: 8px;
    height: 8px;
    border-top: 1px solid #fff;
    border-right: 1px solid #fff;
    transition: 0.3s;
    z-index: 2;
  }
  &:hover {
    color: var(--color-accent);
    &::before {width: 100%;}
    &::after {
      right: 15px;
      border-color: var(--color-accent);
    }
  }
}

.btnLinkGreen a{
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: inline-block;
  padding: 1em 50px 1em 40px;
  line-height: var(--line-height-heading);
  border: 1px solid #fff;
  box-sizing: border-box;
  background: var(--color-primary);
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  transition: color 0.3s;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color:#fff;
    z-index: -1;
    transition: width 0.3s ease;
  }
  &::after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: rotate(45deg) translateY(-50%);
    width: 8px;
    height: 8px;
    border-top: 1px solid #fff;
    border-right: 1px solid #fff;
    transition: 0.3s;
    z-index: 2;
  }
  &:hover {
    color: var(--color-primary);
    &::before {width: 100%;}
    &::after {
      right: 15px;
      border-color: var(--color-primary);
    }
  }
}


@media screen and (max-width: 599px) {
  .btnLink a{
    min-width: 200px;
  }
}


/* テーブル（Table）
========================================================================== */
.tableType01 {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 30px;
  border-collapse: collapse;

  tr {
    border-bottom: 1px solid var(--border-color)
  }

  th {
    padding: 1.5em 1em;
    width: 15%;
    min-width: 140px;
    text-align: left;
    vertical-align: top;
    color: var(--color-primary);
    font-weight: 700;
  }

  td {
    padding: 1.5em 1em;
    vertical-align: top;
  }

  * + & { margin-top: 2em; }

  /* スマホ対応 */
  @media screen and (max-width: 599px) {
    &, tbody, tr, th, td {
      display: block;
      width: 100%;
    }
    th {
      padding: 1.2em 0 0.2em;
      color: var(--color-primary);
    }
    td {
      padding: 0.2em 0 1.2em;
    }
  }
}

/* 画像（Image）
========================================================================== */
.imageMain{
  text-align: center;
}
.imageMain img{
  max-width: 100%;
  height: auto;
}


/* 横スクロールエリア用（Scroll）
========================================================================== */
.scrollWrap {
  position: relative;
  overflow: visible; /* iPhoneバグ対策 */
}

.scrollArrow {
  position: absolute;
  top: calc(50% - 35px);
  z-index: 100;
  width: 40px;
  height: 40px;
  background-position: left top;
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;

  &.prev { left: -3%; background-image: url(../img/icon_next.png); transform: rotate(180deg); }
  &.next { right: -3%; background-image: url(../img/icon_next.png); }

  /* PC向け表示制御クラス */
  .pc-on &.hidden { display: block; }
  .pc-on &.prev { left: 10px; }
  .pc-on &.next { right: 10px; }
  :not(.pc-on) &.hidden { display: none; }

  @media screen and (max-width: 840px) {
    &.hidden { display: none; }
  }
}

.c-responsiveGrid {
  display: grid;
  gap: 20px;

  /* カラム数の Modifier */
  &.--col3 { grid-template-columns: repeat(3, 1fr); }
  &.--col4 { grid-template-columns: repeat(4, 1fr); }

  /* タブレット用のブレイクポイント */
  @media screen and (max-width: 1024px) {
    &.--col4 { grid-template-columns: repeat(2, 1fr); }
  }
  @media screen and (max-width: 840px) {
    &.--col3 { grid-template-columns: repeat(2, 1fr); }
  }

  /* スマホ幅になったら自動的に横スクロールへ変化 */
  @media screen and (max-width: 599px) {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
    
    &::-webkit-scrollbar { height: 8px; }
    &::-webkit-scrollbar-track { background: #fff; }
    &::-webkit-scrollbar-thumb { background: var(--color-primary, #222); border-radius: 9999px; }

    & > * {
      flex: 0 0 260px !important;
      scroll-snap-align: start;
    }
  }
}

/* 背景色
========================================================================== */
.bgGrey{background-color: var(--bg-lightgrey);}
.bgGreen{background-color: var(--color-primary);}



/* アニメーション（Animation）
========================================================================== */
.fadeUp,
.fadeIn,
.fadeText {
  opacity: 0;
  &.is-active {
    animation-fill-mode: forwards;
    animation-delay: var(--delay, 0s);
  }
}


/* 下からふわっと */
.fadeUp {
  &.is-active {
    animation-name: fadeUpAnime;
    animation-duration: 0.7s;
    animation-timing-function: ease-out;
  }
}

@keyframes fadeUpAnime {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* フェレードイン */
.fadeIn {
  &.is-active {
    animation-name: fadeInAnime;
    animation-duration: 1s;
  }
}

@keyframes fadeInAnime {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* テキストせり上がり */
.fadeText {
  &.is-active {
    animation-name: fadeTextAnime;
    animation-duration: 1s;
  }
}

@keyframes fadeTextAnime {
  from {
    opacity: 0;
    transform: translateY(100%);
    transition: all .5s;
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 840px) {
  @keyframes fadeUpAnime {
    from {
      opacity: 0;
      transform: translateY(15px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fadeTextAnime {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}