@charset "UTF-8";

section {
  padding: 3em 1em 15em;
}

.topimg {
  height: 100vh;
}

h1 {
  white-space: nowrap;
}

#slide {
  position: relative;
  width: 100%;
  height: 100%;
}

#slide picture {
  display: block;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 2s ease-in-out;
}

#slide picture.active {
  opacity: 1;
}

#slide img {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

.service {
  background: url(../img/bg/bg_white.jpg.webp) no-repeat center !important;
  background-size: cover !important;
  padding-top: 5em;
}

.no-webp .service {
  background: url(../img/bg/bg_white.jpg) !important;
}

.service ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.service li {
  position: relative;
  width: calc((100% / 4) - 0.75em);
}

.service li a {
  display: block;
  height: 100%;
  position: relative;
  z-index: 1;
  box-shadow: 0 0.2em 0.2em rgba(0, 0, 0, 0.5);
}

.service a img {
  height: 10em;
  object-fit: cover;
}

.service li a {
  display: flex;
  flex-direction: column;
}

.service li a > div {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.5em;
}

.service h3 {
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1.2;
  margin-bottom: 0.3em;
}

.service li:nth-of-type(2) h3 span {
  display: block;
  font-size: 0.8em;
}

.service a p {
  margin-bottom: 0.5em;
}

.service a .btn {
  margin: auto auto 0;
  padding-bottom: 0.5em;
}

.about .bg::before {
  background-image: url(../img/bg/bg_kaisya.jpg.webp);
}

.no-webp .about .bg::before {
  background-image: url(../img/bg/bg_kaisya.jpg);
}

.about h2:nth-of-type(1),
.about table {
  width: calc(50% - 1em);
  float: left;
  margin-right: 2em;
}

.about .contents {
  text-align: center;
}

.about .contents::after {
  content: "";
  display: block;
  clear: both;
}

.about iframe {
  width: calc(50% - 1em);
}

.about .btn {
  margin: 2em 0;
}

.banners {
  display: flex;
  align-items: center;
}

.banners a {
  width: 50%;
}

.banners a:nth-of-type(1) {
  margin-right: 2em;
}

.banners a img {
  width: 100%;
}

.top_recruit {
  padding: 4em 1em 9em;
}

.top_recruit .bg::before {
  background-image: url(../img/bg/bg_white.jpg.webp);
}

.no-webp .top_recruit .bg::before {
  background-image: url(../img/bg/bg_white.jpg);
}

.recruit .contents {
  text-align: center;
}

.top_contact {
  background: var(--bgGray) !important;
  padding: 4em 1em;
}

.top_contact::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 8em 100vw;
  border-color: transparent transparent var(--bgGray) transparent;
  position: absolute;
  top: -8em;
  left: 0;
}

.contact p {
  margin-bottom: 0.5em;
}

@media screen and (max-width: 1023px) {
  .service,
  .about,
  .top_recruit,
  .top_contact {
    padding-left: 1.5em !important;
    padding-right: 1.5em !important;
  }

  .service .bg {
    top: 8em;
  }

  .service li {
    width: calc(50% - 0.5em);
  }

  .service a img {
    width: 100%;
    height: 13em;
  }

  .top_contact::before {
    border-width: 0px 0 7em 100vw;
    top: -7em;
  }
}

@media screen and (max-width: 767px) {
  .service,
  .about,
  .top_recruit,
  .top_contact {
    padding-left: 1em !important;
    padding-right: 1em !important;
  }

  .bg,
  .bg::before {
    top: 6em;
    left: 1em;
  }

  .service {
    padding: 4em 1em 9em;
  }

  .service .bg {
    top: 11em;
    left: 5em;
  }

  .service li {
    width: 100%;
  }

  .service li a {
    flex-direction: row;
  }

  .service a img {
    width: calc(100% / 3);
    height: 100%;
  }

  .about h2:nth-of-type(1),
  .about table {
    width: 100%;
    float: none;
    margin-right: 0;
  }

  .about {
    padding-bottom: 8em;
  }

  .about table {
    margin-bottom: 2em;
  }

  .about iframe {
    width: 100%;
  }

  .banners {
    flex-direction: column;
  }

  .banners a {
    width: 100%;
  }

  .banners a:nth-of-type(1) {
    margin: 0 0 1em 0;
  }

  .top_recruit {
    padding-top: 3.5em;
    padding-bottom: 6em;
  }

  .top_recruit .bg,
  .top_recruit .bg::before {
    top: 4em;
  }

  .top_contact::before {
    border-width: 0px 0 3em 100vw;
    top: -3em;
  }
}

@media screen and (max-width: 767px) {
  .topimg h1 {
    font-size: 1.5em !important;
  }
}

@media screen and (max-width: 480px) {
  .topimg h1 {
    -ms-writing-mode: tb-rl;
    writing-mode: vertical-rl;
    font-size: 2em !important;
  }
  
/* 
  .service {
    background-image: url(../img/bg/bg_white_sp.jpg.webp) !important;
    background-size: cover !important;
    padding-top: 5em;
  }
  
  .no-webp .service {
    background: url(../img/bg/bg_white_sp.jpg) !important;
  }

  .about .bg::before {
    background-image: url(../img/bg/bg_kaisya_sp.jpg.webp);
  }
  
  .no-webp .about .bg::before {
    background-image: url(../img/bg/bg_kaisya_sp.jpg);
  } */
}
