@charset "UTF-8";
.p-contact {
  padding: 0;
  background: transparent;
}

.p-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.p-contact__card {
  position: relative;
  box-sizing: border-box;
  height: clamp(388px, 28.4vw, 543px);
  background: #20bcb0;
  padding: clamp(50px, 3.7335285505vw, 70px) clamp(64px, 5.4904831625vw, 105px) clamp(62px, 4.6120058565vw, 87px) clamp(46px, 3.513909224vw, 67px);
  overflow: hidden;
}

.p-contact__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../images/img_topContact-mask.png") 50px -25px/auto 100% no-repeat;
  pointer-events: none;
}

/* Contact(teal)は左右反転して左詰め（直線を左角に合わせ、曲線を中央側へ）。
   scaleX(-1)で反転するため、x=100%(右基準)が反転後に左端へ来る。 */
.p-contact__card:not(.p-contact__card--entry)::before {
  /* right基準＋scaleX(-1)で、どの幅でもオブジェクトが左(外側)・曲線が右(中央側)に来る */
  background-position: right -25px;
  transform: scaleX(-1);
}

.p-contact__card > * {
  position: relative;
  z-index: 1;
}

.p-contact__card--entry {
  background: #8bd9a3;
}

.p-contact__card--entry::before {
  background-image: url("../images/img_topContact-mask-entry.png");
  /* Entry(lime)は反転なし＋right基準＝塗りが右(外側)・曲線が左(中央側)。Contactと左右対称になる */
  background-position: right 40px;
}

.p-contact__card h2 {
  margin-top: 4px;
  margin-left: 10px;
  padding-left: 33px;
}

.p-contact__card .c-sectionTitle {
  position: absolute;
  top: clamp(50px, 3.7335285505vw, 70px);
  left: clamp(46px, 3.513909224vw, 67px);
}

.p-contact__card .c-sectionTitle h2::before {
  background: #ffffff;
}

.p-contact__card > p:not(.p-contact__cta) {
  /* ボタンと同じ幅・右寄せにして追従させる（左固定だと幅が狭まると右で見切れる） */
  width: clamp(315px, 22.18vw, 424px);
  max-width: none;
  margin: clamp(126px, 9.5168374817vw, 183px) 0 0 auto;
}

.p-contact__card > .p-contact__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: clamp(315px, 22.18vw, 424px);
  min-height: clamp(54px, 3.95vw, 76px);
  margin-top: clamp(24px, 1.76vw, 34px);
  margin-right: 0;
  margin-bottom: 0;
  margin-left: auto;
  max-width: none;
  padding: 0 clamp(20px, 1.46vw, 28px) 0 clamp(38px, 2.78vw, 53px);
  border-radius: 999px;
  background: #ffffff;
  transform-origin: center;
  transition: transform 0.25s ease;
}

.p-contact__cta::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  background: url("../images/icon_topContact-arrow.svg") center/contain no-repeat;
}

.p-contact__cta:hover,
.p-contact__cta:focus-visible {
  transform: scale(1.05);
}

@media screen and (max-width: 900px) {
  .p-contact__grid {
    grid-template-columns: 1fr;
  }
  .p-contact__card {
    height: auto;
    padding: 48px 32px;
  }
  .p-contact__card .c-sectionTitle {
    position: relative;
    top: auto;
    left: auto;
  }
  .p-contact__card > p:not(.p-contact__cta) {
    width: auto;
    margin: 36px 0 0;
  }
  .p-contact__card > .p-contact__cta {
    width: min(100%, 303px);
    margin-top: 28px;
    margin-left: 0;
  }
}
/* 1981px超：clampの上限に達してカードだけ広がり、タイトル左・本文/ボタン右が離れて
   間延びするため、「タイトル左／本文・ボタン右」の構図は維持したまま、コンテンツ領域を
   幅560pxに固定してカード中央に寄せる（左右padding=カード幅の半分-280px で内側を560pxに固定）。
   カード幅=ビューポートの半分(2カラム)なので 25vw-280px で算出。≤1981は従来のclamp挙動。 */
@media screen and (min-width: 1982px) {
  .p-contact__card {
    padding-left: calc(25vw - 280px);
    padding-right: calc(25vw - 280px);
  }
  .p-contact__card .c-sectionTitle {
    left: calc(25vw - 280px);
  }
}
.p-footer {
  position: relative;
  padding: 64px 0 0;
  overflow: hidden;
  background: #f2f9f2;
}

.p-footer > .l-container {
  position: relative;
  z-index: 1;
}

.p-footer__top {
  margin-left: 48px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  align-items: start;
}

.p-footer__brand {
  display: grid;
  justify-items: start;
}

.p-footer__logo a {
  display: inline-block;
  transform-origin: center;
  transition: transform 0.25s ease;
  width: 371px;
  height: 54px;
}

.p-footer__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.p-footer__logo a:hover,
.p-footer__logo a:focus-visible {
  transform: scale(1.04);
}

.p-footer__info {
  display: block;
  margin-top: 10px;
}

.p-footer__info p {
  margin: 0;
}

/* TEL：ラベルと電話リンクを同一行に。リンク化するのは番号のみ（ラベルは外） */
.p-footer__tel {
  display: flex;
  align-items: baseline;
  margin-top: 10px;
}

.p-footer__info a {
  position: relative;
  display: inline-block;
  transition: color 0.25s ease;
}

.p-footer__info a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.28s ease;
}

.p-footer__info a:hover::after,
.p-footer__info a:focus-visible::after {
  transform: translateX(-50%) scaleX(1);
}

.p-footer__nav {
  display: grid;
  gap: 34px;
  justify-content: flex-end;
  padding-top: 19px;
  padding-right: 42px;
}

.p-footer__navRow {
  display: flex;
  align-items: center;
}

.p-footer__navRow--top {
  justify-content: flex-end;
  gap: 40px;
}

.p-footer__navRow--bottom {
  justify-content: flex-end;
  gap: 40px;
}

.p-footer__nav a {
  position: relative;
  margin: 0;
  white-space: nowrap;
}

.p-footer__nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 100%;
  height: 2px;
  background: var(--color-green-bright);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.28s ease;
}

.p-footer__nav a:hover::after,
.p-footer__nav a:focus-visible::after {
  transform: translateX(-50%) scaleX(1);
}

.p-footer__copy {
  margin: 43px 0 20px;
  text-align: center;
}

.p-footer__illust {
  width: 100%;
}

.p-footer__illust img {
  width: 100%;
  max-width: none;
}

.p-to-top {
  position: fixed;
  right: 28px;
  bottom: 142px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
}

.p-to-top::before {
  content: "";
  width: 0;
  height: 0;
  border-right: 3px solid transparent;
  border-bottom: 5px solid #444444;
  border-left: 3px solid transparent;
}

.p-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.p-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0, 156, 119, 0.12);
}

.p-to-top__text p {
  margin: 0;
  text-align: center;
}

@media screen and (max-width: 1100px) {
  .p-footer {
    padding-top: 56px;
  }
  .p-footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-left: 0;
  }
  /* 段組み時はブランド情報（ロゴ・住所・TEL）も中央揃えにして、中央のnavと揃える */
  .p-footer__brand {
    justify-items: center;
    text-align: center;
  }
  .p-footer__tel {
    justify-content: center;
  }
  .p-footer__logo a {
    width: 260px;
  }
  .p-footer__nav {
    padding-top: 0;
    padding-right: 0;
    justify-content: center;
  }
  .p-footer__navRow {
    flex-wrap: wrap;
    justify-content: center;
  }
  .p-to-top {
    right: 16px;
    bottom: 142px;
    width: 82px;
    height: 82px;
    gap: 10px;
  }
}
/* 狭幅では2行構造(3項目＋5項目)が各行で折り返して孤立するため、
   全8項目を2列グリッドに統一して4行×2列で揃える（孤立を解消）。
   701px以上は下段5項目が1行に収まるので従来のflex-wrapを維持。 */
@media screen and (max-width: 700px) {
  .p-footer__nav {
    display: grid;
    /* 左列に固定幅を与え、2列クラスタを中央へ寄せる（1fr 1frだと全幅に広がり間延びする） */
    grid-template-columns: 145px auto;
    justify-content: center;
    column-gap: 56px;
    row-gap: 18px;
    padding-right: 0;
  }
  .p-footer__navRow {
    display: contents;
  }
  /* 2列グリッドではaがグリッドアイテムとして列幅いっぱいに伸びてしまい、
     ホバー下線(::after width:100%)が文字より長くなる。内容幅に収める。 */
  .p-footer__nav a {
    justify-self: start;
  }
}
