/**
 * Component - Child hero
 * 下層ページヒーロー
 */

.c-childHero {
  min-height: 430px;
  padding-block: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("../../../images/bg_child_hero.png");
  background-size: cover;
  background-position: center;

  @media screen and (max-width: 767px) {
    min-height: 332px;
    background-image: url("../../../images/bg_child_hero_sp.png");
  }

  .l-headingPrimary.--hasBorder {
    border-bottom: 1px solid;

    &::after {
      display: none;
    }
  }

  &.--service {
    padding-block: 50px;
    min-height: 674px;
    background-image: url("../../../images/bg_child_hero_service.png");

    @media screen and (max-width: 767px) {
      min-height: 332px;
      background-image: url("../../../images/bg_child_hero_service_sp.png");
    }

    .l-container {
      height: 100%;
    }

    .c-childHeroHeading,
    .c-childHeroDescription {
      font-family: var(--font-mincho);
    }

    .c-childHeroHeading {
      @media screen and (max-width: 767px) {
        font-size: 2rem;
      }
    }

    .c-childHeroDescription {
      font-size: 18px;
      line-height: 1.4;
      margin-top: 1rem;

      @media screen and (max-width: 767px) {
        font-size: 20px;
      }
    }
  }
}

.c-childHeroContainer {
  display: flex;
  justify-content: space-between;
  gap: 40px;

  @media screen and (max-width: 767px) {
    flex-direction: column;
  }
}

.c-childHeroLeft {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  flex-grow: 1;
  gap: 8px;

  @media screen and (max-width: 767px) {
    align-items: flex-start;
  }
}

.c-childHeroBalloon {
  background-color: #fbf5e0;
  border-radius: 4px;
  max-width: 468px;
  position: relative;

  @media screen and (max-width: 767px) {
    margin-inline: auto;
  }

  &::after {
    content: "";
    display: inline-block;
    width: 46px;
    height: 60px;
    background-color: #fbf5e0;
    clip-path: polygon(0 0, 0% 100%, 100% 50%);
    position: absolute;
    top: 50%;
    right: -24px;
    translate: 0 -50%;

    @media screen and (max-width: 767px) {
      top: 100%;
      right: 50%;
      translate: 50% -32px;
      rotate: 90deg;
    }
  }
}
.c-childHeroBalloonHeading {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  line-height: 38px;
  border-radius: 4px 4px 0 0;
  background-color: #ffe380;
}
.c-childHeroBalloonBody {
  padding-block: 18px 10px;
  padding-inline: 20px;
}

.c-childHeroRight {
  background-color: #e6e6e6;
  border-radius: 4px;
  width: 43%;
  height: 580px;
  overflow-y: scroll;
  overflow-x: hidden;
  padding-block: 32px;
  padding-inline: 32px;
  flex-shrink: 0;

  @media screen and (max-width: 767px) {
    width: 100%;
    padding-inline: 16px;
    max-width: 516px;
    margin-inline: auto;
  }
}

.c-childHeroRight::-webkit-scrollbar {
  width: 14px;
}

.c-childHeroRight::-webkit-scrollbar-track {
  background: #b8b8b8;
  border-radius: 30px;
}

.c-childHeroRight::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 30px;
  border: 4px solid #b8b8b8;
}

.c-childHeroForm {
  form {
    display: flex;
    flex-direction: column;
  }

  .p-contactSubmit {
    order: 1;
  }

  .wpcf7-response-output {
    order: 2;
    margin-top: 0.5rem;
  }

  .p-contactPrivacy {
    font-size: 1rem;
    text-align: center;

    a {
      color: #5669fb;
    }
  }

  .p-contactSubmitBtn {
    background: linear-gradient(270deg, #ffdf85 0%, #e0bd2e 100%);
    color: var(--color-text-main);
    height: 40px;
    min-width: inherit;
    width: 280px;
    max-width: 100%;
    padding-inline: 1rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;

    &::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(270deg, #fefff1 0%, #ffe26c 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
      border-radius: inherit;
      z-index: -1;
    }

    &:hover {
      opacity: 1;

      &::after {
        opacity: 1;
      }
    }
  }

  .p-contactFormInput,
  .p-contactFormTextarea {
    background-color: #fff;
    border: 1px solid #999;
    border-radius: 4px;
  }
}

.c-childHeroFormTitle {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 1rem;
}

.c-childHeroFormMustDescription {
  color: #ec0000;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 1rem;
}

.c-childHero__mainText {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--color-text-light);
  margin-top: 1.5rem;

  @media screen and (max-width: 767px) {
    font-size: 0.875rem;
  }
}

.c-childHeroUpper {
  color: var(--color-text-light);
  display: grid;
  gap: 0.5rem;
  margin-bottom: 40px;
}
.c-childHeroHeading {
  color: var(--color-text-light);
  font-size: 48px;
  @media screen and (max-width: 767px) {
    font-size: 22px;
  }

  &.--hasSmallText {
    display: flex;
    flex-direction: column;
    gap: 8px;
    &::after {
      content: attr(data-text);
      font-size: 1rem;
    }
  }

  span {
    display: inline-block;
  }
}
.c-childHeroDescription {
  color: var(--color-text-light);
  font-weight: bold;
  line-height: 1.7;
  margin-top: 40px;
}

.c-childHeroCta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: 40px;
}
.c-childHeroCtaButton {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  min-width: 280px;
  min-height: 48px;
  padding-inline: calc(16px + 24px + 4px);
  background-color: var(--color-bg-white);
  border: 1px solid;
  border-radius: 4px;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;

  @media (hover: hover) {
    &:hover {
      background-color: #1a1a1a;
      color: var(--color-text-light);

      &::after {
        background-image: url("../../../images/icon_arrow_right_white.svg");
      }

      &::before {
        filter: invert(1);
      }
    }
  }

  &::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-position: center;
    position: absolute;
    top: 50%;
    left: 16px;
    translate: 0 -50%;
  }

  &::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("../../../images/icon_arrow_right_black.svg");
    background-size: contain;
    background-position: center;
    position: absolute;
    top: 50%;
    right: 16px;
    translate: 0 -50%;
  }

  &.--contact {
    border-color: rgb(0 0 0 / 60%);
    &::before {
      background-image: url("../../../images/icon_mail_black.svg");
    }
  }
  &.--download {
    border-color: #1a1a1a;
    &::before {
      background-image: url("../../../images/icon_docs_black.svg");
    }
  }
}
