/* 社員紹介ページ専用CSS */

.recruit-page main {
  padding-top: 0;
  padding-bottom: 40px;
}

.recruit-kv {
  position: relative;
  width: 100%;
  height: clamp(240px, 34vw, 420px);
  margin: 0 0 48px;
  overflow: hidden;
}

.recruit-kv::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 24, 53, 0.5), rgba(8, 24, 53, 0.14));
}

.recruit-kv-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recruit-kv-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  padding: 0 56px 44px;
  box-sizing: border-box;
}

.recruit-kv-title {
  margin: 0;
  color: var(--hanagasa-white);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: 3px;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.recruit-intro-section {
  position: relative;
}

.people-floating-area {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px 24px;
  max-width: 1800px;
  margin: 0 auto;
  padding: 8px 0 0;
  box-sizing: border-box;
}

.member-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  grid-column: span 2;
  width: 100%;
}

.member-node.is-odd-row-start {
  grid-column: 1 / span 2;
}

.member-node.is-even-row-start {
  grid-column: 2 / span 2;
}

.member-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #ffffff;
  box-shadow: 0 16px 28px rgba(0, 80, 136, 0.22);
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-avatar-text {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #dce8f3;
  color: #005088;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.member-name {
  padding: 4px 12px;
  border-radius: 999px;
  color: #005088;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 80, 136, 0.2);
}

.member-node:hover .member-avatar,
.member-node:focus-visible .member-avatar {
  transform: scale(1.05);
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 32, 0.45);
}

.detail-modal-card {
  position: relative;
  width: min(940px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  padding: 30px;
  border-radius: 24px;
  clip-path: inset(0 round 24px);
  isolation: isolate;
  background: #ffffff;
  box-shadow: 0 28px 48px rgba(6, 18, 36, 0.24);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.18, 1.2, 0.35, 1), opacity 0.35s ease;
}

.detail-modal-year-ribbon {
  position: absolute;
  z-index: 6;
  display: none;
  place-items: center;
  width: 240px;
  height: 44px;
  background: #005088;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(0, 80, 136, 0.24);
  pointer-events: none;
  user-select: none;
  contain: layout paint;
  overflow: clip;
}

.detail-modal-year-ribbon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.detail-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.detail-modal.is-active .detail-modal-card {
  transform: scale(1);
  opacity: 1;
}

.detail-modal-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  max-height: calc(100dvh - 108px);
  overflow-y: auto;
  overflow-x: clip;
}

.detail-modal-photo-wrap {
  width: 320px;
  height: 430px;
  border-radius: 18px;
  overflow: hidden;
  background: #e9f1f8;
}

.detail-modal-photo {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  display: block;
}

.detail-modal-photo-placeholder {
  width: 100%;
  min-height: 430px;
  display: none;
  align-items: center;
  justify-content: center;
  background: #dce8f3;
  color: #005088;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.detail-modal-name {
  margin: 0;
  color: #005088;
  font-size: 2.5rem;
  font-weight: 700;
}

.detail-modal-name-group {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.detail-modal-name-en {
  margin: 0;
  color: #5c7895;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: none;
  text-align: right;
}

.detail-modal-role {
  margin: 8px 0 16px;
  color: #2d5e89;
  font-size: 16px;
  font-weight: 700;
}

.detail-modal-qa-list {
  margin: 0;
}

.detail-modal-qa-row {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 80, 136, 0.18);
}

.detail-modal-qa-row dt {
  color: #005088;
  margin-bottom: 6px;
}

.detail-modal-qa-row dd {
  margin: 0;
  color: var(--text-dark);
  line-height: 1.85;
  overflow-wrap: break-word;
  word-break: break-word;
}

.detail-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 80, 136, 0.24);
  border-radius: 50%;
  background: #ffffff;
  color: #005088;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.detail-modal-close:hover {
  background: rgba(0, 80, 136, 0.08);
}

body.is-modal-open {
  overflow: hidden;
}

.recruit-section-inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

.recruit-lead {
  margin: 0 auto 24px;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.9;
}

.recruit-members-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.recruit-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.recruit-link-card {
  display: block;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(0, 91, 187, 0.14);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 50, 110, 0.07);
  text-decoration: none;
  color: inherit;
}

.recruit-link-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--hanagasa-blue);
  font-size: 13px;
  font-weight: 700;
}

.recruit-link-title {
  display: block;
  margin-bottom: 10px;
  color: var(--hanagasa-blue);
  font-size: 22px;
}

.recruit-link-text {
  margin: 0;
  color: var(--text-dark);
  line-height: 1.8;
}

.recruit-member-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 91, 187, 0.14);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 50, 110, 0.07);
}

.recruit-member-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.recruit-member-body {
  padding: 18px;
}

.recruit-member-role {
  margin: 0;
  color: var(--hanagasa-blue);
  font-size: 13px;
  font-weight: 700;
}

.recruit-member-name {
  margin: 6px 0 10px;
  color: var(--hanagasa-blue);
  font-size: 22px;
}

.recruit-member-text {
  margin: 0;
  color: var(--text-dark);
  line-height: 1.8;
}

.recruit-requirements-list {
  display: grid;
  gap: 32px;
}

.recruit-requirement-card {
  padding: 0 0 28px;
  border: none;
  border-bottom: 1px solid rgba(0, 80, 136, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.recruit-requirement-title {
  margin: 0 0 22px;
  padding: 10px 14px;
  border-left: 6px solid #005088;
  background: rgba(0, 80, 136, 0.09);
  color: #005088;
  font-size: 24px;
}

.recruit-requirement-dl {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
}

.recruit-requirement-dl dt {
  position: relative;
  padding-left: 1.1em;
  font-size: 20px;
  font-weight: 700;
  color: #005088;
}

.recruit-requirement-dl dt::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0;
  color: #005088;
}

.recruit-requirement-dl dd {
  margin: 0 0 0 8px;
  line-height: 1.9;
  font-size: 18px;
  color: #333333;
}

.recruit-contact-box {
  margin-top: 32px;
  padding: 28px;
  border-radius: 16px;
  background: rgba(0, 91, 187, 0.06);
  text-align: center;
}

.recruit-contact-text {
  margin: 0 0 16px;
  line-height: 1.8;
}

@media (min-width: 900px) {
  .detail-modal-name-group {
    container-type: inline-size;
    container-name: detail-name-group;
  }

  .detail-modal-name {
    flex: 1 1 auto;
    min-width: 0;
    max-inline-size: 100%;
    white-space: nowrap;
    line-height: 1.12;
    overflow: hidden;
    text-overflow: clip;
  }

  .detail-modal-name-en {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .detail-modal-qa-row dt {
    font-size: 22px;
    font-weight: 700;
  }
  .detail-modal-qa-row dd {
    font-size: 18px;
  }

  @supports (container-type: inline-size) {
    .detail-modal-name {
      font-size: clamp(1.875rem, calc(1rem + 3.25cqw), 2.5rem);
    }
  }
}

@media (min-width: 577px) {
  .detail-modal-year-ribbon {
    right: -60px;
    bottom: 26px;
    transform: rotate(-40deg);
    transform-origin: center;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .people-floating-area {
    gap: 36px 24px;
    padding-inline: 8px;
  }

  .recruit-members-grid {
    grid-template-columns: 1fr;
  }

  .recruit-links-grid {
    grid-template-columns: 1fr;
  }

  .detail-modal-card {
    width: min(840px, calc(100vw - 32px));
  }
}

@media (max-width: 899px) {
  .people-floating-area {
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 24px 16px;
    padding-inline: 6px;
  }

  .member-node.is-odd-row-start {
    grid-column: 1 / span 2 !important;
  }

  .member-node.is-even-row-start {
    grid-column: 2 / span 2 !important;
  }

  .detail-modal-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
  }

  .detail-modal-photo-wrap {
    flex-shrink: 0;
    width: 200px;
    height: 260px;
    margin: 0;
    border-radius: 12px;
    border: 2px solid #005088;
  }

  .detail-modal-photo,
  .detail-modal-photo-placeholder {
    min-height: auto !important;
    width: 100%;
    height: 100%;
  }

  .detail-modal-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
    align-items: center;
  }

  .detail-modal-name {
    margin: 0;
    font-size: 32px;
  }

  .detail-modal-name-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
  }

  .detail-modal-name-en {
    text-align: center;
  }

  .detail-modal-role {
    margin: 8px 0 0;
  }

  .detail-modal-qa-row dt {
    font-size: 18px;
    font-weight: 700;
  }

  .detail-modal-qa-list {
    width: 100%;
    text-align: left;
    margin-top: 24px;
    align-self: flex-start;
  }

    .detail-modal-card {
    width: min(500px, calc(100vw - 32px));
  }
}

@media (max-width: 576px) {
  .people-floating-area {
    grid-template-columns: repeat(6, 1fr) !important;
  }

  .member-node.is-odd-row-start {
    grid-column: 1 / span 2 !important;
  }

  .member-node.is-even-row-start {
    grid-column: 2 / span 2 !important;
  }

  .detail-modal-photo-wrap {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1 / 1;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
  }

  .recruit-kv {
    height: 220px;
    margin-bottom: 32px;
  }

  .recruit-kv-overlay {
    align-items: flex-end;
    padding: 0 24px 28px;
  }

  .recruit-kv-title {
    font-size: 29px;
    letter-spacing: 2px;
  }

  .recruit-section-inner {
    padding: 0 20px;
  }

  .member-avatar {
    border-width: 3px;
  }

  .member-name {
    font-size: 12px;
    padding: 3px 10px;
  }

  .detail-modal-card {
    padding: 20px 16px;
    border-radius: 16px;
    clip-path: inset(0 round 16px);
    width: min(350px, calc(100vw - 32px));
  }

  .detail-modal-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .detail-modal-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-left: 0;
    min-height: 0;
    gap: 8px;
  }

  .detail-modal-qa-list {
    width: 330px;
    text-align: left;
    margin-top: 0;
    align-self: flex-start;
  }

  .detail-modal-qa-row {
    padding: 10px 0;
  }

  .detail-modal-name {
    font-size: 28px;
  }

  .detail-modal-role {
    font-size: 14px;
  }

  .detail-modal-name-en {
    text-align: center;
  }

  .detail-modal-year-ribbon {
    left: -60px;
    top: 24px;
    transform: rotate(-40deg);
    transform-origin: center;
  }

}
