.contact-section {
  position: relative;
  overflow: hidden;
  background: url("../img/contact_bg.png") no-repeat;
  background-size: 100% 100%;
  padding: 3rem;
  margin-top: -4.5rem;
  z-index: 2;
  width: 100%;
}

.contact-section::after {
  content: "CONTACT";
  position: absolute;
  top: 50%;
  right: 3%;
  transform: translateY(-50%);
  font-family: "Poiret One", sans-serif;
  font-weight: 100;
  font-size: 151px;
  color: rgb(255 255 255 / 50%);
  pointer-events: none;
  z-index: -1;
}

.contact-section__text {
  text-align: center;
  color: #444c66;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 19px;
  position: absolute;
  top: calc(50% - 50px);
  left: 50%;
  transform: translate(-50%, -50%);
}

.contact-section__inner {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
  padding-top: 50px;
}

.contact-section__title {
  font-family: "M PLUS 1p", sans-serif;
  font-size: 29px;
  font-weight: 400;
  margin: 0;
  line-height: 1.2;
}

.contact-section__subtitle {
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.125rem;
  font-weight: 300;
  margin: 0.25rem 0 0;
  opacity: 0.8;
}

.contact-section__image img {
  height: 270px;
  display: block;
}

.contact-section__tel {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.contact-section__tel-sp {
  display: none;
}

.contact-section__tel-icon {
  width: 1.4375rem;
}

.contact-section__tel-number {
  font-size: 42px;
  font-weight: bold;
  color: #3153ad;
  text-decoration: none;
}

.contact-section__tel-hours {
  font-size: 13px;
  color: #3153ad;
  margin-left: 0.25rem;
}

.contact-section__cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 0 0 auto;
}

.contact-section__email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #d7ff31;

  padding: 1rem 3.75rem;
  border-radius: 1.875rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

.contact-section__email-sp {
  display: none;
}

.contact-section__email-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: auto;
}

.contact-section__email-text {
  font-family: "M PLUS 1p", sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: #1f2a4e;
  white-space: nowrap;
}

.contact-section__more-icon {
  flex-shrink: 0;
  width: 0.5rem;
  height: auto;
}

.contact-section__email:hover {
  background-color: #c1e629;
}

@media (width <= 1300px) {
  .contact-section {
    padding-top: 8rem;
    padding-bottom: 5rem;
  }

  .contact-section__image {
    display: none;
  }

  .contact-section__text {
    position: relative;
  }

  .contact-section__inner {
    justify-content: center;
    gap: 1rem 2rem;
    padding-top: 0%;
  }
}

@media (width <= 1030px) {
  .contact-section {
    padding-top: 10rem;
    margin-top: -4rem;
    background-size: auto;
    background: url("../img/contact_section_bg.png") no-repeat right top;
    background-size: auto 108%;
  }

  .contact-section::after {
    top: 25%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    font-size: 5rem;
  }

  .contact-section__title {
    font-size: 18px;
    white-space: nowrap;
  }

  .contact-section__subtitle {
    font-size: 0.9rem;
  }

  .contact-section__image img {
    width: 11rem;
  }

  .contact-section__text {
    margin-bottom: 0.5rem;
    flex: 1 1 18rem;
    top: 33%;
  }

  .contact-section__cta {
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }

  /*
  .contact-section__email,
  .contact-section__tel {
    width: 18rem;
  }

  .contact-section__tel {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 0.5rem;
    background: #d7ff31;
    padding: 1rem 2.5rem;
    border-radius: 1.875rem;
    transition: background-color 0.2s;
  }

  .contact-section__tel:hover {
    background: #c1e629;
  }
  */

  .contact-section__tel-icon {
    grid-row: 1 / span 2;
    width: 1rem;
  }

  .contact-section__tel-number {
    grid-row: 1;
    font-size: 30px;
  }

  .contact-section__tel-hours {
    grid-row: 2;
    margin-left: 0;
  }

  .contact-section__email {
    padding-left: 3rem;
  }

  .contact-section__email-text {
    font-size: 0.9rem;
  }

  .contact-section__more-icon {
    display: none;
  }
}
@media (width <= 900px) {
  .contact-section__cta {
    flex-direction: column;
  }
}
@media (width <= 500px) {
  .contact-section::after {
    top: 15%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    font-size: 4rem;
  }

  .contact-section__inner {
    flex-direction: row;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    right: 5px;
  }

  .contact-section__image {
    margin-top: 0.5rem;
    width: 9rem;
    flex: 0 0 9rem;
    position: relative;
    top: 3vh;
    left: 10%;
    display: block;
  }

  .contact-section__image img {
    width: 100%;
    height: auto;
  }

  .contact-section__cta {
    flex-direction: column-reverse;
    align-items: center;
    width: 100%;
    gap: 10px;
  }

  .contact-section__email {
    display: none;
  }

  .contact-section__tel {
    width: 14rem;
  }

  .contact-section__email-sp {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    transition: background-color 0.2s;
  }

  .contact-section__email-text-sp {
    display: flex;
    flex-direction: column; /* 子を縦方向に積む */
  }

  .contact-section__email-text-1 {
    font-weight: 500;
  }

  .contact-section__tel {
    display: none;
  }

  .contact-section__tel-sp {
    display: flex;
    flex-direction: row; /* ← 子要素を横に積む */
    align-items: center; /* 中央寄せ（左寄せなら left） */
    gap: 0;
    z-index: 10;
  }

  .contact-section__tel-text-info {
    display: flex;
    flex-direction: column; /* ← テキストは縦積み */
    align-items: center; /* ← 左寄せ */
  }

  .contact-section__tel-number {
    font-size: 22px;
    margin-bottom: -5px;
  }

  .contact-section__tel-icon {
    width: 1.1rem;
    margin-top: 8px;
  }

  .contact-section__tel-icon,
  .contact-section__tel-note,
  .contact-section__tel-number,
  .contact-section__tel-hours {
    grid-column: 2; /* ← 全部1カラム目に収める */
  }

  .contact-section__tel-note {
    font-size: 1.125rem;
    margin-bottom: -8px;
  }

  .contact-section__email-sp,
  .contact-section__tel-sp {
    width: 12rem; /* 横幅をそろえる */
    height: 4rem;
    justify-content: center;
    background: #d7ff31; /* 背景色 */
    padding: 0.3rem 0.8rem; /* 内側余白 */
    border-radius: 5rem; /* 角丸 */
  }

  .contact-section__email {
    padding-left: 1rem;
  }

  .contact-section__email-text {
    margin-bottom: -5px;
    margin-left: 35%;
  }

  .contact-section__email-text-1 {
    font-size: 20px;
    color: #1f2a4e;
  }

  .contact-section__email-icon {
    width: 2rem;
    margin-right: 10px;
    margin-bottom: 8px;
    vertical-align: middle;
  }
}

@media (width <= 370px) {
  .contact-section {
    padding-bottom: 10rem;
  }

  .contact-section::after {
    top: 18%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    font-size: 4rem;
  }

  .contact-section__title {
    font-size: 1.2rem;
  }

  .contact-section__inner {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .contact-section__image {
    margin-top: 0;
  }

  .contact-section__text {
    margin-bottom: 0;
  }

  .contact-section__cta {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .contact-section__email,
  .contact-section__tel {
    width: 100%;
    max-width: 20rem;
  }

  .contact-section__tel-number {
    font-size: 1.125rem;
  }

  .contact-section__tel-hours {
    font-size: 0.6rem;
  }
}
