/* recruit-topページのスタイル */

/* body背景色（recruit-topページ専用） */
body {
  background-color: #fff !important;
}

/* ヘッダーの「お問い合わせ」と「EN」を非表示 */
body:has(main.recruit-top) .header_info .web_info,
body.page-recruit-top .header_info .web_info {
  display: none !important;
}

body:has(main.recruit-top) #global_nav ul li:has(a[href*="/contact"]),
body.page-recruit-top #global_nav ul li:has(a[href*="/contact"]) {
  display: none !important;
}

body:has(main.recruit-top) #global_nav ul li:has(a[href*="/en"]):not(:has(ul)),
body.page-recruit-top #global_nav ul li:has(a[href*="/en"]):not(:has(ul)) {
  display: none !important;
}

/* content-section */
.content-section {
  width: 100% !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 20px 40px 40px !important;
}

/* greeting-layout */
.greeting-layout {
  gap: 0 !important;
  row-gap: 0 !important;
  column-gap: 0 !important;
}

/* トップグリッドセクション */
.recruit-top-grid-section {
  width: 100%;
  height: calc(100vh - 100px);
  margin-top: 100px;
  position: relative;
  overflow: visible;
  padding-inline: 40px;
  background-color: #ffffff;
}

.recruit-top-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, 1fr);
  column-gap: 20px;
  row-gap: 20px;
  position: relative;
  overflow: visible;
}

/* サンプル画像（6-12列、2-9行） */
.recruit-top-grid-sample {
  grid-column: 6 / 12;
  grid-row: 2 / 9;
  margin-bottom: 3em;
  position: relative;
  overflow: hidden;
}

.recruit-top-grid-sample img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* トップ左画像（1-2列、5-7行） */
.recruit-top-grid-left {
  grid-column: 1 / 3;
  grid-row: 5 / 7;
  position: relative;
  overflow: hidden;
}

.recruit-top-grid-left img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* トップ中央画像（3-4列、2-4行） */
.recruit-top-grid-middle {
  grid-column: 3 / 5;
  grid-row: 2 / 4;
  position: relative;
  overflow: hidden;
}

.recruit-top-grid-middle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* トップ右画像（10-11列、2-4行） */
.recruit-top-grid-right {
  grid-column: 10 / 12;
  grid-row: 2 / 4;
  position: relative;
  overflow: hidden;
}

.recruit-top-grid-right img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* トップメッセージ（3-7列、5-7行） */
.recruit-top-grid-message {
  grid-column: 3 / 7;
  grid-row: 5 / 7;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* recruit-topページのh1要素のスタイルをリセット（recruit-jobと同じアプローチ） */
.recruit-top-grid-message .recruit-top-hero-title {
  margin-top: 0 !important;
  font-size: 62px;
  font-weight: normal;
  line-height: 1.1;
  padding: 0 !important;
  text-align: left;
  color: #191e2e;
  background: none !important;
}

.recruit-top-grid-message .recruit-top-hero-title span {
  color: #23A0DA;
}

.recruit-top-grid-message .recruit-top-hero-title-br {
  display: none;
}

/* メディアクエリでも上書き（recruit-jobと同じアプローチ） */
@media screen and (min-width: 1001px) {
  .recruit-top-grid-message .recruit-top-hero-title {
    margin-top: 0 !important;
  }
}

@media screen and (max-width: 1000px) {
  .recruit-top-grid-section {
    margin-top: 64px;
  }
}

@media screen and (max-width: 1024px) {
  .recruit-top-grid-sample {
    grid-column: 5 / 12;
    grid-row: 2 / 7;
  }

  .recruit-top-grid-middle {
    grid-column: 2 / 4;
  }

  .recruit-top-grid-message {
    grid-column: 3 / 11;
    grid-row: 6 / 8;
  }

  .recruit-top-grid-message .recruit-top-hero-title {
    font-size: 48px;
  }
}

/* タブレットサイズ（768px〜1024px） */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .recruit-top-grid-section {
    height: 55vh;
  }

  .recruit-top-grid {
    grid-template-rows: repeat(8, auto);
  }
}

/* タブレットサイズ（768px〜1024px）かつ横長 */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .recruit-top-grid-section {
    height: calc(100vh - 100px);
  }
}

/* レスポンシブ（767px以下） */
@media screen and (max-width: 767px) {
  .recruit-top-grid-section {
    height: auto;
    margin-top: 64px;
  }

  .recruit-top-grid {
    grid-template-rows: repeat(8, auto);
  }

  .recruit-top-grid-message {
    grid-column: 3 / 12;
  }

  .recruit-top-grid-message .recruit-top-hero-title {
    font-size: 36px;
  }
}

/* 480px以下 */
@media screen and (max-width: 480px) {
  .content-section {
    padding: 30px 24px 30px !important;
  }

  .recruit-top-grid-section {
    padding-inline: 30px;
  }

  .recruit-top-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(8, auto);
  }

  .recruit-top-grid-sample {
    grid-column: 1 / 5;
    grid-row: 2 / 7;
    margin-bottom: 0;
    margin-top: 0;
  }

  .recruit-top-grid-left {
    display: none;
  }

  .recruit-top-grid-middle {
    grid-column: 1 / 3;
    grid-row: 6 / 8;
  }

  .recruit-top-grid-right {
    grid-column: 3 / 5;
    grid-row: 2 / 4;
  }

  .recruit-top-grid-message {
    grid-column: 1 / 5;
    grid-row: 1 / 2;
    padding-top: 2em;
    padding-bottom: 1em;
    padding-left: 5%;
  }

  .recruit-top-grid-message .recruit-top-hero-title-br {
    display: block;
  }
}

/* サークル画像（11列、7行目） */
.recruit-top-grid-circle {
  grid-column: 11 / 12;
  grid-row: 7 / 8;
  position: relative;
  overflow: hidden;
}

.recruit-top-grid-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* トップ画像セクション */
.recruit-top-hero {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: visible;
  padding-inline: 40px;
  background-color: #ffffff;
}

.recruit-top-hero-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, 1fr);
  column-gap: 20px;
  row-gap: 20px;
  position: relative;
  overflow: visible;
}

/* サブ画像（左側） */
.recruit-top-hero-sub {
  grid-column: 2 / 6;
  grid-row: 1 / 1;
  margin-top: 5.25rem;
  position: relative;
  isolation: isolate;
  overflow: visible;
  align-self: start;
}

/* サブ画像用影要素（枠線のみ） */
.recruit-top-hero-sub-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 20vw;
  aspect-ratio: 1 / 1;
  background-image: var(--stroke-sub);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translate(-45px, 125px);
  z-index: -1;
  pointer-events: none;
}

.recruit-top-hero-sub-container {
  width: 20vw;
  aspect-ratio: 1 / 1;
  position: relative;
  container-type: inline-size;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
}

.recruit-top-hero-sub-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* メイン画像（右側、マスク適用） */
.recruit-top-hero-main {
  grid-column: 6 / -1;
  grid-row: 1 / 1;
  margin-top: -5rem;
  margin-right: -100px;
  margin-left: 40px;
  position: relative;
  isolation: isolate;
  overflow: visible;
  align-self: start;
}

/* サンプル画像（5-10列、3-7行） */
.recruit-top-hero-sample {
  grid-column: 5 / 11;
  grid-row: 3 / 8;
  position: relative;
  overflow: hidden;
}

.recruit-top-hero-sample img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* 影用要素（枠線のみ） */
.recruit-top-hero-main-shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 60vw;
  aspect-ratio: 1144 / 1357;
  background-image: var(--stroke-pc);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translate(-45px, 125px);
  z-index: -1;
  pointer-events: none;
}

.recruit-top-hero-main-container {
  width: 60vw;
  aspect-ratio: 1144 / 1357;
  position: relative;
  container-type: inline-size;
  mask-image: var(--mask-pc);
  -webkit-mask-image: var(--mask-pc);
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
}

.recruit-top-hero-main-swiper {
  width: 100%;
  height: 100%;
}

.recruit-top-hero-main-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.recruit-top-hero-main-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* タブレットサイズ（768px〜1023px） */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .recruit-top-hero {
    height: auto;
    padding-inline: 30px;
  }

  .recruit-top-hero-sub {
    grid-column: 1 / 4;
    margin-top: 3rem;
  }

  .recruit-top-hero-sub-shadow {
    width: 25vw;
  }

  .recruit-top-hero-sub-container {
    width: 25vw;
  }

  .recruit-top-hero-main {
    grid-column: 4 / -1;
    margin-top: -3rem;
    margin-right: -50px;
    margin-left: 20px;
  }

  .recruit-top-hero-main-shadow {
    width: 70vw;
  }

  .recruit-top-hero-main-container {
    width: 70vw;
  }
}

/* レスポンシブ */
@media screen and (max-width: 767px) {
  .recruit-top-hero {
    height: 80vh;
    padding-inline: 20px;
  }

  .recruit-top-hero-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .recruit-top-hero-sub {
    grid-column: 1 / -1;
    grid-row: 2 / 5;
    margin-top: 0;
    margin-left: -32px;
  }

  .recruit-top-hero-sub-shadow {
    width: 40vw;
    transform: translate(-10px, 60px);
  }

  .recruit-top-hero-sub-container {
    width: 40vw;
  }

  .recruit-top-hero-main {
    grid-column: 1 / -1;
    grid-row: 4 / 5;
    margin-top: 0.3125rem;
    margin-right: 0;
    margin-left: calc(36px - 20px);
  }

  .recruit-top-hero-main-shadow {
    width: 101.7333333333vw;
    background-image: var(--stroke-mobile);
    transform: translate(-10px, 60px);
  }

  .recruit-top-hero-main-container {
    width: 101.7333333333vw;
    margin-top: 0;
    mask-image: var(--mask-mobile);
    -webkit-mask-image: var(--mask-mobile);
  }
}

/* 767px〜480pxの範囲 */
@media screen and (min-width: 480px) and (max-width: 767px) {
  .recruit-top-hero-main {
    grid-column: 2 / -1;
  }

  .recruit-top-hero-main-shadow {
    width: 80vw;
  }

  .recruit-top-hero-main-container {
    width: 80vw;
  }
}

/* Message Imagesセクション */
.recruit-message-images-section {
  position: relative;
  width: 100%;
  padding: 40px 40px;
  background-color: #fff;
}

.recruit-message-images-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.recruit-message-image-panel {
  position: relative;
  z-index: 5;
}

.recruit-message-image-panel figure {
  position: relative;
}

.recruit-message-image-panel figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.0s ease-out, transform 1.5s ease-out;
}

.recruit-message-image-panel figure img.is-visible {
  opacity: 1;
  transform: scale(1);
}

.recruit-message-image01 {
  position: relative;
  width: 65.36%;
  max-width: 547px;
  overflow: hidden;
}

.recruit-message-image01::before {
  content: "";
  display: block;
  padding-top: 145.7%; /* 798/547のアスペクト比 */
}

.recruit-message-image01 img {
  position: absolute;
  top: 0;
  left: 0;
}

.recruit-message-image02 {
  position: relative;
  width: 73.0%;
  max-width: 613px;
  margin-top: -11.3%;
  margin-left: auto;
  overflow: hidden;
}

.recruit-message-image02::before {
  content: "";
  display: block;
  padding-top: 117.6%; /* 721/613のアスペクト比 */
}

.recruit-message-image02 img {
  position: absolute;
  top: 0;
  left: 0;
}

/* 装飾要素 */
.recruit-parts-decorate01 {
  position: absolute;
  top: calc(50% - 49.76%);
  left: calc(50% + 2.5%);
  translate: 0 -50%;
  display: block;
  width: 34.88%;
  aspect-ratio: 1 / 0.695;
  background: url(../../img/yoriyasu/recruit/parts_decorate01.svg) center center/contain no-repeat;
  z-index: 10;
}

.recruit-parts-decorate02 {
  position: absolute;
  top: calc(50% - 18.83%);
  left: calc(50% + 39.64%);
  translate: 0 -50%;
  width: 25.16%;
  aspect-ratio: 1 / 0.91;
  background: url(../../img/yoriyasu/recruit/parts_decorate02.svg) center center/contain no-repeat;
  z-index: 10;
}

.recruit-parts-decorate03 {
  position: absolute;
  top: calc(50% + 46.44%);
  left: calc(50% - 44.58%);
  translate: 0 -50%;
  width: 33.08%;
  aspect-ratio: 1 / 0.9758;
  background: url(../../img/yoriyasu/recruit/parts_decorate03.svg) center center/contain no-repeat;
  z-index: -1;
}

/* PC版（1024px以上） */
@media screen and (min-width: 1024px) {
  .recruit-message-images-section {
    padding: 40px 93px;
    margin-bottom: 0px;
  }

  .recruit-message-images-container {
    display: flex;
    justify-content: center;
  }

  .recruit-message-image-panel {
    width: 48.44%;
    margin: 0 auto;
    max-width: 840px;
  }
}

/* タブレットサイズ（768px〜1023px） */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .recruit-message-images-section {
    padding: 40px 40px;
  }

  .recruit-message-image-panel {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
}

/* モバイルサイズ（767px以下） */
@media screen and (max-width: 767px) {
  .recruit-message-images-section {
    padding: 40px 20px;
  }

  .recruit-message-image-panel {
    width: 100%;
  }

  .recruit-message-image01 {
    width: 65%;
    max-width: 100%;
  }

  .recruit-message-image02 {
    width: 73%;
    max-width: 100%;
    margin-top: -11.3%;
    margin-left: auto;
  }

  .recruit-parts-decorate01 {
    top: calc(50% - 66.74%);
    left: -7.57%;
    translate: 0 -50%;
    width: 34.88%;
  }

  .recruit-parts-decorate02 {
    top: calc(50% - 48.1%);
    left: calc(50% + 35.22%);
    translate: 0 -50%;
    width: 25.16%;
  }

  .recruit-parts-decorate03 {
    top: auto;
    bottom: 17.69%;
    left: calc(50% - 44%);
    translate: 0 0;
    width: 33.27%;
  }
}

/* オフィスギャラリーセクション */
.gallery-section {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px 100px;
  background-color: #fff;
}

.gallery-section.workstyle-section {
  scroll-margin-top: 0;
  margin-bottom: 0;
}

.gallery-section .container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* セクション見出し */
.gallery-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 50px;
}

.gallery-section-title {
  font-size: 32px;
  font-weight: bold;
  color: #005AB7;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.gallery-section-subtitle {
  font-size: 16px;
  color: #666666;
  margin: 0;
}

/* レスポンシブ */
@media screen and (max-width: 767px) {
  .gallery-section {
    padding: 40px 20px 60px;
  }

  .gallery-header {
    margin-bottom: 0;
  }
}

@media screen and (max-width: 480px) {
  .gallery-section {
    padding: 40px 20px 40px;
  }
}
