/* ヒーローセクション */
.hero {
  display: flex;
  flex-direction: column;
  gap: 96px;
  align-items: center;
  padding: 96px;

  > p {
    padding: 0 32px;
    text-align: center;
  }
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 192px);
  background: url("../images/data/hero.png") center/cover no-repeat;

  h1 {
    font-size: 64px;
  }

  p {
    font-size: 24px;
    line-height: 1;
  }
}

@media (width <= 768px) {
  .hero {
    padding: 0;
  }

  .hero__inner {
    min-height: 100vh;

    h1 {
      font-size: 48px;
    }

    p {
      font-size: 24px;
    }
  }
}

/* 情報セクション共通 */
.info {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  max-width: 1280px;
  padding: 64px 0;
  margin: 0 auto;

  h2 {
    font-size: 32px;
  }
}

.info__contents {
  display: grid;
  width: 70%;
  margin: 0 auto;
}

.info__item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  padding: 32px;

  img {
    width: 30%;
  }

  p {
    font-family: "Shippori Mincho", serif;
    font-size: 32px;

    span {
      font-size: 64px;
      line-height: 1;
    }
  }
}

@media (width <= 768px) {
  .info {
    gap: 48px;
    padding: 32px;

    h2 {
      display: flex;
      gap: 1rem;
      align-items: center;
      justify-content: center;
      width: 100%;
      font-size: 24px;

      &::before,
      &::after {
        display: block;
        flex-grow: 1;
        content: "";
        border-top: 1px solid #000;
      }
    }
  }

  .info__contents {
    display: flex;
    flex-direction: column;
    gap: 48px;
    align-items: center;
    width: 100%;
  }

  .info__item {
    padding: 0;
    border: none !important;
  }
}

/* 基本情報セクション */
.basic .info__contents {
  grid-template-columns: repeat(2, 1fr);
}

.basic .info__item {
  &:nth-of-type(even) {
    border-left: 1px solid #000;
  }

  &:nth-of-type(odd) {
    border-right: 1px solid #000;
  }

  &:nth-of-type(n + 3) {
    border-top: 1px solid #000;
  }

  &:nth-of-type(-n + 2) {
    border-bottom: 1px solid #000;
  }
}

/* 社員セクション */
.workers .info__contents {
  grid-template-columns: repeat(2, 1fr);
}

.workers .info__item {
  &:nth-of-type(1) {
    grid-column: 1/3;
    border-bottom: 1px solid #000;
  }

  &:nth-of-type(n + 2) {
    border-top: 1px solid #000;
  }

  &:nth-of-type(2) {
    border-right: 1px solid #000;
  }

  &:nth-of-type(3) {
    border-left: 1px solid #000;
  }
}

.info__item--gender-ratio {
  flex-direction: row;
  align-items: center;
  justify-content: center;

  img {
    width: 20%;
  }

  div {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;

    p span {
      font-size: 72px;
    }
  }
}

.info__item--hometown-ratio {
  position: relative;
  gap: 48px;
  justify-content: flex-end;

  div {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;

    &:nth-of-type(1) {
      top: 16px;
      left: 48px;
    }

    &:nth-of-type(2) {
      right: 48px;
      bottom: 64px;
    }

    p {
      font-size: 1.2rem;

      span {
        font-size: 3.6rem;
      }
    }
  }

  img {
    width: 40%;
  }
}

@media (width <= 768px) {
  .info__item--gender-ratio {
    img {
      width: 25%;
    }

    div {
      p span {
        font-size: min(3.2rem, 14vw);
      }
    }
  }

  .info__item--hometown-ratio {
    img {
      width: 50%;
    }

    div {
      &:nth-of-type(1) {
        top: -20%;
        left: -10%;
      }

      &:nth-of-type(2) {
        right: -10%;
        bottom: 20%;
      }

      p span {
        font-size: min(2.5rem, 14vw);
      }
    }
  }
}

/* 支援セクション */
.welfare .info__contents {
  grid-template-columns: repeat(3, 1fr);
}

.welfare .info__item {
  &:nth-of-type(1) {
    border-bottom: 1px solid #000;
  }

  &:nth-of-type(2) {
    border-top: 1px solid #000;
    border-right: 1px solid #000;
  }

  &:nth-of-type(3) {
    border-top: 1px solid #000;
    border-right: 1px solid #000;
    border-left: 1px solid #000;
  }

  &:nth-of-type(4) {
    border-top: 1px solid #000;
    border-left: 1px solid #000;
  }

  &:nth-of-type(n + 2) {
    img {
      width: 60%;
    }
  }
}

.welfare .info__contents .info__item--parental-leave {
  flex-direction: row;
  grid-column: 1/4;
  justify-content: center;

  img {
    width: 20%;
  }

  div {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
  }

  > span {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 16px;
    margin-left: 16px;
    font-size: 0.8rem;
    color: #fff;
    background-color: #bacad3;
    border-radius: 9999px;
  }
}

@media (width <= 768px) {
  .info__item--parental-leave {
    flex-direction: column;
    width: 100%;

    img {
      width: 50%;
    }

    > span {
      width: 100%;
      aspect-ratio: unset;
      border-radius: 0;
    }
  }
}
